Searched refs:sensor (Results 1 - 25 of 89) sorted by relevance

1234

/frameworks/base/core/java/android/hardware/
H A DSensorListener.java21 * sensor values have changed.
30 * <p>Called when sensor values have changed.
32 * depending on which sensor is being monitored.
34 * for details on possible sensor types.
87 * @param sensor The ID of the sensor being monitored
88 * @param values The new values for the sensor.
90 public void onSensorChanged(int sensor, float[] values); argument
93 * Called when the accuracy of a sensor has changed.
97 * @param sensor Th
100 onAccuracyChanged(int sensor, int accuracy) argument
[all...]
H A DSensorEventListener2.java25 * was called have been delivered to the applications registered for those sensor events. In
27 * even if some other application has called flush() on the same sensor. Starting with
33 * @param sensor The {@link android.hardware.Sensor Sensor} on which flush was called.
36 public void onFlushCompleted(Sensor sensor); argument
H A DSensorEventCallback.java20 * Used for receiving sensor additional information frames.
25 * Called when sensor values have changed.
33 * Called when the accuracy of the registered sensor has changed.
38 public void onAccuracyChanged(Sensor sensor, int accuracy) {} argument
46 public void onFlushCompleted(Sensor sensor) {} argument
49 * Called when a sensor additional information frame is available.
52 * reported from sensor hardware.
H A DSensorEventListener.java21 * there is new sensor data.
26 * Called when there is a new sensor event. Note that "on changed"
28 * new reading from a sensor with the exact same sensor values (but a
32 * for details on possible sensor types.
46 * Called when the accuracy of the registered sensor has changed. Unlike
52 * @param accuracy The new accuracy of this sensor, one of
55 public void onAccuracyChanged(Sensor sensor, int accuracy); argument
H A DSensorEvent.java21 * holds information such as the sensor's type, the time-stamp, accuracy and of
22 * course the sensor's {@link SensorEvent#values data}.
60 * which {@link android.hardware.Sensor sensor} type is being monitored (see
74 * A sensor of this type measures the acceleration applied to the device
76 * sensor itself (<b>Fs</b>) using the relation:
152 * same as is used for the acceleration sensor. Rotation is positive in the
234 * <li>values[0]: Proximity sensor distance measured in centimeters </li>
239 * <i>far</i> measurement. In this case, the sensor should report its
246 * are m/s^2. The coordinate system is the same as is used by the acceleration sensor.</p>
247 * <p><b>Note:</b> When the device is at rest, the output of the gravity sensor shoul
638 public Sensor sensor; field in class:SensorEvent
[all...]
H A DTriggerEvent.java21 * associated with a Trigger Sensor. When the sensor detects a trigger
24 * is called with the TriggerEvent. The sensor is automatically canceled
27 * This class holds information such as the value of the sensor
39 * which {@link android.hardware.Sensor sensor} type is being monitored (see
43 * The value field is of length 1. value[0] = 1.0 when the sensor triggers.
49 * The sensor that generated this event. See
52 public Sensor sensor; field in class:TriggerEvent
H A DSystemSensorManager.java59 Sensor sensor, int index);
116 // initialize the sensor list
118 Sensor sensor = new Sensor();
119 if (!nativeGetSensorAtIndex(mNativeInstance, sensor, index)) break;
120 mFullSensorsList.add(sensor);
121 mHandleToSensor.put(sensor.getHandle(), sensor);
144 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, argument
146 if (listener == null || sensor == null) {
147 Log.e(TAG, "sensor o
58 nativeGetSensorAtIndex(long nativeInstance, Sensor sensor, int index) argument
191 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
216 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument
250 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument
317 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument
335 cleanupSensorConnection(Sensor sensor) argument
523 configureDirectChannelImpl( SensorDirectChannel channel, Sensor sensor, int rate) argument
660 addSensor( Sensor sensor, int delayUs, int maxBatchReportLatencyUs) argument
697 removeSensor(Sensor sensor, boolean disable) argument
740 enableSensor( Sensor sensor, int rateUs, int maxBatchReportLatencyUs) argument
753 disableSensor(Sensor sensor) argument
767 addSensorEvent(Sensor sensor) argument
768 removeSensorEvent(Sensor sensor) argument
782 addSensorEvent(Sensor sensor) argument
791 removeSensorEvent(Sensor sensor) argument
877 addSensorEvent(Sensor sensor) argument
886 removeSensorEvent(Sensor sensor) argument
948 addSensorEvent(Sensor sensor) argument
953 removeSensorEvent(Sensor sensor) argument
[all...]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/hardware/
H A DFakeSensorManager.java44 * Currently only supports the proximity sensor.
74 // return non-wakeup sensors if we can't find a wakeup sensor.
80 return Lists.newArrayList(mMockProximitySensor.sensor);
89 protected void unregisterListenerImpl(SensorEventListener listener, Sensor sensor) { argument
90 if (sensor == mMockProximitySensor.sensor || sensor == null) {
96 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, argument
99 if (sensor == mMockProximitySensor.sensor) {
140 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument
145 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument
156 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument
187 setSensorField(Sensor sensor, String fieldName, Object value) argument
193 setSensorType(Sensor sensor, int type) argument
200 final Sensor sensor; field in class:FakeSensorManager.MockProximitySensor
203 MockProximitySensor(Sensor sensor) argument
[all...]
/frameworks/native/services/sensorservice/
H A DSensorInterface.cpp32 BaseSensor::BaseSensor(const sensor_t& sensor) : argument
34 mSensor(&sensor, mSensorDevice.getHalDeviceVersion()) {
37 BaseSensor::BaseSensor(const sensor_t& sensor, const uint8_t (&uuid)[16]) : argument
39 mSensor(sensor, Sensor::uuid_t(uuid), mSensorDevice.getHalDeviceVersion()) {
44 HardwareSensor::HardwareSensor(const sensor_t& sensor): argument
45 BaseSensor(sensor) {
48 HardwareSensor::HardwareSensor(const sensor_t& sensor, const uint8_t (&uuid)[16]): argument
49 BaseSensor(sensor, uuid) {
H A DSensorDirectConnection.h25 #include <sensor/Sensor.h>
26 #include <sensor/BitTube.h>
27 #include <sensor/ISensorServer.h>
28 #include <sensor/ISensorEventConnection.h>
47 // stop all active sensor report. if backupRecord is set to false,
52 // recover sensor reports previously stopped by stopAll(true)
H A DRotationVectorSensor.cpp32 const sensor_t sensor = { local
43 mSensor = Sensor(&sensor);
57 outEvent->sensor = getSensorToken();
118 const sensor_t sensor = { local
129 mSensor = Sensor(&sensor);
142 outEvent->sensor = '_gbs';
H A DOrientationSensor.h23 #include <sensor/Sensor.h>
H A DCorrectedGyroSensor.cpp41 const sensor_t sensor = { local
52 mSensor = Sensor(&sensor);
64 outEvent->sensor = '_cgy';
H A DGravitySensor.cpp40 const sensor_t sensor = { local
51 mSensor = Sensor(&sensor);
64 // translates to an offset in the linear-acceleration sensor.
71 outEvent->sensor = '_grv';
H A DLinearAccelerationSensor.cpp35 const sensor_t sensor = { local
46 mSensor = Sensor(&sensor);
57 outEvent->sensor = '_lin';
/frameworks/base/native/android/
H A Dsensor.cpp17 #define LOG_TAG "sensor"
21 #include <android/sensor.h>
24 #include <sensor/Sensor.h>
25 #include <sensor/SensorManager.h>
26 #include <sensor/SensorEventQueue.h>
52 if (sensor == nullptr) { \
53 ERROR_INVALID_PARAMETER("sensor cannot be NULL"); \
188 ASensorManager *manager, ASensor const *sensor, int channelId, int rate) {
192 if (sensor == nullptr) {
195 "sensor canno
187 ASensorManager_configureDirectReport( ASensorManager *manager, ASensor const *sensor, int channelId, int rate) argument
208 ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor, int32_t samplingPeriodUs, int64_t maxBatchReportLatencyUs) argument
222 ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument
230 ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument
238 ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec) argument
286 ASensor_getName(ASensor const* sensor) argument
291 ASensor_getVendor(ASensor const* sensor) argument
296 ASensor_getType(ASensor const* sensor) argument
301 ASensor_getResolution(ASensor const* sensor) argument
306 ASensor_getMinDelay(ASensor const* sensor) argument
311 ASensor_getFifoMaxEventCount(ASensor const* sensor) argument
316 ASensor_getFifoReservedEventCount(ASensor const* sensor) argument
321 ASensor_getStringType(ASensor const* sensor) argument
326 ASensor_getReportingMode(ASensor const* sensor) argument
331 ASensor_isWakeUpSensor(ASensor const* sensor) argument
336 ASensor_isDirectChannelTypeSupported(ASensor const *sensor, int channelType) argument
341 ASensor_getHighestDirectReportRateLevel(ASensor const *sensor) argument
[all...]
/frameworks/native/include/android/
H A Dsensor.h23 * @file sensor.h
46 * Structures and functions to receive and process sensor events in
73 * Invalid sensor type. Returned by {@link ASensor_getType} as error value.
104 * The light sensor value is returned in SI lux units.
111 * The proximity sensor which turns the screen off and back on during calls is the
112 * wake-up proximity sensor. Implement wake-up proximity sensor before implementing
113 * a non wake-up proximity sensor. For the wake-up proximity sensor set the flag
196 * A sensor even
220 int32_t sensor; member in struct:AMetaDataEvent
264 int32_t sensor; member in struct:ASensorEvent
[all...]
/frameworks/hardware/interfaces/sensorservice/libsensorndkbridge/
H A DASensorManager.cpp62 LOG(ERROR) << "Sensor service died. Cleanup sensor manager instance!";
75 LOG(ERROR) << "Transaction error in linking to sensor service death: " <<
78 LOG(WARNING) << "Unable to link to sensor service death notifications";
80 LOG(DEBUG) << "Link to sensor service death notification successful";
128 [&](const auto &sensor, auto result) {
134 if (sensor == mSensors[i]) {
221 if (sensor == NULL) { \
294 ASensor const* sensor,
303 ASensor const* sensor,
309 sensor, samplingPeriodU
301 ASensorEventQueue_registerSensor( ASensorEventQueue* queue, ASensor const* sensor, int32_t samplingPeriodUs, int64_t maxBatchReportLatencyUs) argument
312 ASensorEventQueue_enableSensor( ASensorEventQueue* queue, ASensor const* sensor) argument
319 ASensorEventQueue_disableSensor( ASensorEventQueue* queue, ASensor const* sensor) argument
326 ASensorEventQueue_setEventRate( ASensorEventQueue* queue, ASensor const* sensor, int32_t usec) argument
346 ASensor_getName(ASensor const* sensor) argument
351 ASensor_getVendor(ASensor const* sensor) argument
356 ASensor_getType(ASensor const* sensor) argument
362 ASensor_getResolution(ASensor const* sensor) argument
367 ASensor_getMinDelay(ASensor const* sensor) argument
372 ASensor_getFifoMaxEventCount(ASensor const* sensor) argument
377 ASensor_getFifoReservedEventCount(ASensor const* sensor) argument
382 ASensor_getStringType(ASensor const* sensor) argument
387 ASensor_getMaxRange(ASensor const* sensor) argument
[all...]
H A DASensorEventQueue.h24 #include <android/sensor.h>
46 ASensorRef sensor,
50 int enableSensor(ASensorRef sensor);
51 int disableSensor(ASensorRef sensor);
53 int setEventRate(ASensorRef sensor, int32_t samplingPeriodUs);
H A DASensorEventQueue.cpp45 ASensorRef sensor,
49 reinterpret_cast<const SensorInfo *>(sensor)->sensorHandle,
60 int ASensorEventQueue::enableSensor(ASensorRef sensor) { argument
64 sensor, SENSOR_DELAY_NORMAL, 0 /* maxBatchReportLatencyUs */);
68 ASensorRef sensor, int32_t samplingPeriodUs) {
69 // Technically this is not supposed to enable the sensor but using this
70 // API without enabling the sensor first is a no-op, so...
72 sensor, samplingPeriodUs, 0 /* maxBatchReportLatencyUs */);
75 int ASensorEventQueue::disableSensor(ASensorRef sensor) { argument
77 reinterpret_cast<const SensorInfo *>(sensor)
44 registerSensor( ASensorRef sensor, int32_t samplingPeriodUs, int64_t maxBatchReportLatencyUs) argument
67 setEventRate( ASensorRef sensor, int32_t samplingPeriodUs) argument
[all...]
/frameworks/native/libs/sensor/
H A DSensorEventQueue.cpp19 #include <sensor/SensorEventQueue.h>
27 #include <sensor/Sensor.h>
28 #include <sensor/BitTube.h>
29 #include <sensor/ISensorEventConnection.h>
31 #include <android/sensor.h>
124 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const {
125 return enableSensor(sensor, SENSOR_DELAY_NORMAL);
128 status_t SensorEventQueue::enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const { argument
129 return mSensorEventConnection->enableDisable(sensor->getHandle(), true,
133 status_t SensorEventQueue::disableSensor(Sensor const* sensor) cons
151 setEventRate(Sensor const* sensor, nsecs_t ns) const argument
[all...]
/frameworks/native/libs/sensor/include/sensor/
H A DSensorEventQueue.h27 #include <sensor/BitTube.h>
56 * Typical sensor delay (sample period) in microseconds.
64 // Default sensor sample period
81 status_t enableSensor(Sensor const* sensor) const;
82 status_t enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const;
83 status_t disableSensor(Sensor const* sensor) const;
84 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
91 // Send an ack for every wake_up sensor event that is set to WAKE_UP_SENSOR_EVENT_NEEDS_ACK.
/frameworks/base/core/java/android/view/
H A DOrientationListener.java53 * @param rate at which sensor events are processed (see also
79 * Enables the OrientationListener so it will monitor the sensor and call
93 public void onAccuracyChanged(int sensor, int accuracy) { argument
96 public void onSensorChanged(int sensor, float[] values) { argument
/frameworks/base/core/jni/
H A Dandroid_hardware_SensorManager.cpp28 #include <sensor/Sensor.h>
29 #include <sensor/SensorEventQueue.h>
30 #include <sensor/SensorManager.h>
154 translateNativeSensorToJavaSensor(JNIEnv *env, jobject sensor, const Sensor& nativeSensor) { argument
157 if (sensor == NULL) {
158 // Sensor sensor = new Sensor();
159 sensor = env->NewObject(sensorOffsets.clazz, sensorOffsets.init, "");
162 if (sensor != NULL) {
168 env->SetObjectField(sensor, sensorOffsets.name, name);
169 env->SetObjectField(sensor, sensorOffset
199 nativeGetSensorAtIndex(JNIEnv *env, jclass clazz, jlong sensorManager, jobject sensor, jint index) argument
224 jobject sensor = translateNativeSensorToJavaSensor(env, NULL, nativeList[i]); local
[all...]
/frameworks/native/services/sensorservice/tests/
H A Dsensorservicetest.cpp18 #include <android/sensor.h>
19 #include <sensor/Sensor.h>
20 #include <sensor/SensorManager.h>
21 #include <sensor/SensorEventQueue.h>

Completed in 3456 milliseconds

1234