Searched refs:sensor (Results 1 - 25 of 92) 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
639 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
192 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
217 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument
252 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument
319 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument
337 cleanupSensorConnection(Sensor sensor) argument
525 configureDirectChannelImpl( SensorDirectChannel channel, Sensor sensor, int rate) argument
662 addSensor( Sensor sensor, int delayUs, int maxBatchReportLatencyUs) argument
699 removeSensor(Sensor sensor, boolean disable) argument
742 enableSensor( Sensor sensor, int rateUs, int maxBatchReportLatencyUs) argument
756 disableSensor(Sensor sensor) argument
770 addSensorEvent(Sensor sensor) argument
771 removeSensorEvent(Sensor sensor) argument
785 addSensorEvent(Sensor sensor) argument
794 removeSensorEvent(Sensor sensor) argument
880 addSensorEvent(Sensor sensor) argument
889 removeSensorEvent(Sensor sensor) argument
951 addSensorEvent(Sensor sensor) argument
956 removeSensorEvent(Sensor sensor) argument
[all...]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/hardware/
H A DFakeSensorManager.java46 * Currently only supports the proximity sensor.
86 // return non-wakeup sensors if we can't find a wakeup sensor.
104 protected void unregisterListenerImpl(SensorEventListener listener, Sensor sensor) { argument
107 if (sensor == null || s.mSensor == sensor) {
114 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, argument
117 Preconditions.checkNotNull(sensor);
120 if (s.mSensor == sensor) {
162 protected boolean requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) { argument
167 protected boolean cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, argument
178 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument
209 setSensorField(Sensor sensor, String fieldName, Object value) argument
215 setSensorType(Sensor sensor, int type) argument
223 MockProximitySensor(Sensor sensor) argument
237 FakeGenericSensor( 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';
/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
79 * Invalid sensor type. Returned by {@link ASensor_getType} as error value.
110 * The light sensor value is returned in SI lux units.
116 * The pressure sensor value is returned in hPa (millibar).
123 * The proximity sensor which turns the screen off and back on during calls is the
124 * wake-up proximity sensor. Implement wake-up proximity sensor before implementing
125 * a non wake-up proximity sensor. For the wake-up proximity sensor se
312 int32_t sensor; member in struct:AMetaDataEvent
356 int32_t sensor; member in struct:ASensorEvent
[all...]
/frameworks/native/include_sensor/android/
H A Dsensor.h23 * @file sensor.h
46 * Structures and functions to receive and process sensor events in
79 * Invalid sensor type. Returned by {@link ASensor_getType} as error value.
110 * The light sensor value is returned in SI lux units.
116 * The pressure sensor value is returned in hPa (millibar).
123 * The proximity sensor which turns the screen off and back on during calls is the
124 * wake-up proximity sensor. Implement wake-up proximity sensor before implementing
125 * a non wake-up proximity sensor. For the wake-up proximity sensor se
312 int32_t sensor; member in struct:AMetaDataEvent
356 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]) {
224 if (sensor == NULL) { \
297 ASensor const* sensor,
306 ASensor const* sensor,
312 sensor, samplingPeriodU
304 ASensorEventQueue_registerSensor( ASensorEventQueue* queue, ASensor const* sensor, int32_t samplingPeriodUs, int64_t maxBatchReportLatencyUs) argument
315 ASensorEventQueue_enableSensor( ASensorEventQueue* queue, ASensor const* sensor) argument
322 ASensorEventQueue_disableSensor( ASensorEventQueue* queue, ASensor const* sensor) argument
329 ASensorEventQueue_setEventRate( ASensorEventQueue* queue, ASensor const* sensor, int32_t usec) argument
349 ASensor_getName(ASensor const* sensor) argument
354 ASensor_getVendor(ASensor const* sensor) argument
359 ASensor_getType(ASensor const* sensor) argument
365 ASensor_getResolution(ASensor const* sensor) argument
370 ASensor_getMinDelay(ASensor const* sensor) argument
375 ASensor_getFifoMaxEventCount(ASensor const* sensor) argument
380 ASensor_getFifoReservedEventCount(ASensor const* sensor) argument
385 ASensor_getStringType(ASensor const* sensor) argument
390 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.cpp44 ASensorRef sensor,
48 reinterpret_cast<const SensorInfo *>(sensor)->sensorHandle,
59 int ASensorEventQueue::enableSensor(ASensorRef sensor) { argument
63 sensor, SENSOR_DELAY_NORMAL, 0 /* maxBatchReportLatencyUs */);
67 ASensorRef sensor, int32_t samplingPeriodUs) {
68 // Technically this is not supposed to enable the sensor but using this
69 // API without enabling the sensor first is a no-op, so...
71 sensor, samplingPeriodUs, 0 /* maxBatchReportLatencyUs */);
74 int ASensorEventQueue::disableSensor(ASensorRef sensor) { argument
76 reinterpret_cast<const SensorInfo *>(sensor)
43 registerSensor( ASensorRef sensor, int32_t samplingPeriodUs, int64_t maxBatchReportLatencyUs) argument
66 setEventRate( ASensorRef sensor, int32_t samplingPeriodUs) argument
[all...]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
H A DAsyncSensorManager.java37 * Wrapper around sensor manager that hides potential sources of latency.
70 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, argument
73 if (!mInner.registerListener(listener, sensor, delayUs, maxReportLatencyUs, handler)) {
74 Log.e(TAG, "Registering " + listener + " for " + sensor + " failed.");
113 protected boolean requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) { argument
115 if (!mInner.requestTriggerSensor(listener, sensor)) {
116 Log.e(TAG, "Requesting " + listener + " for " + sensor + " failed.");
123 protected boolean cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, argument
128 if (!mInner.cancelTriggerSensor(listener, sensor)) {
129 Log.e(TAG, "Canceling " + listener + " for " + sensor
141 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument
153 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) 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 374 milliseconds

1234