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

123

/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
588 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.java56 Sensor sensor, int index);
103 // initialize the sensor list
105 Sensor sensor = new Sensor();
106 if (!nativeGetSensorAtIndex(mNativeInstance, sensor, index)) break;
107 mFullSensorsList.add(sensor);
108 mHandleToSensor.put(sensor.getHandle(), sensor);
131 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, argument
133 if (listener == null || sensor == null) {
134 Log.e(TAG, "sensor o
55 nativeGetSensorAtIndex(long nativeInstance, Sensor sensor, int index) argument
173 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
198 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument
226 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument
288 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument
306 cleanupSensorConnection(Sensor sensor) argument
529 addSensor( Sensor sensor, int delayUs, int maxBatchReportLatencyUs) argument
566 removeSensor(Sensor sensor, boolean disable) argument
609 enableSensor( Sensor sensor, int rateUs, int maxBatchReportLatencyUs) argument
622 disableSensor(Sensor sensor) argument
636 addSensorEvent(Sensor sensor) argument
637 removeSensorEvent(Sensor sensor) argument
651 addSensorEvent(Sensor sensor) argument
660 removeSensorEvent(Sensor sensor) argument
746 addSensorEvent(Sensor sensor) argument
755 removeSensorEvent(Sensor sensor) argument
817 addSensorEvent(Sensor sensor) argument
822 removeSensorEvent(Sensor sensor) argument
[all...]
H A DSensorManager.java46 * is an example of a trigger sensor.
68 * public void onAccuracyChanged(Sensor sensor, int accuracy) {
91 // Legacy sensor manager implementation. Guarded by mSensorListByType during initialization.
94 /* NOTE: sensor IDs must be a power of 2 */
97 * A constant describing an orientation sensor. See
115 * A constant describing a temperature sensor See
124 * A constant describing a magnetic sensor See
133 * A constant describing an ambient light sensor See
142 * A constant describing a proximity sensor See
160 * A constant describing an orientation sensor
640 unregisterListener(SensorEventListener listener, Sensor sensor) argument
667 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
721 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs) argument
778 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, int maxReportLatencyUs) argument
813 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, Handler handler) argument
844 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, int maxReportLatencyUs, Handler handler) argument
851 registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, Handler handler, int maxReportLatencyUs, int reservedFlags) argument
893 onDynamicSensorConnected(Sensor sensor) argument
900 onDynamicSensorDisconnected(Sensor sensor) argument
1668 requestTriggerSensor(TriggerEventListener listener, Sensor sensor) argument
1675 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument
1700 cancelTriggerSensor(TriggerEventListener listener, Sensor sensor) argument
1707 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument
1767 injectSensorData(Sensor sensor, float[] values, int accuracy, long timestamp) argument
1796 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument
[all...]
H A DSensorAdditionalInfo.java38 * The sensor that generated this event. See
41 public final Sensor sensor; field in class:SensorAdditionalInfo
88 * not taken into account by sensor timestamps.
105 * Vector calibration parameter. Calibration applied to a sensor with 3 elements vector output,
115 * Sensor placement. Describes location and installation angle of the sensor device.
119 * the location and orientation of the sensor. Origin of reference will be the mobile device
120 * geometric sensor. Reference frame is defined as the same as Android sensor frame.
136 sensor = aSensor;
H A DLegacySensorManager.java29 * Helper class for implementing the legacy sensor manager API.
110 // Are we activating this legacy sensor?
113 Sensor sensor = mSensorManager.getDefaultSensor(type);
114 if (sensor != null) {
131 // register this legacy sensor with this legacy listener
134 result = mSensorManager.registerListener(legacyListener, sensor, rate);
136 result = true; // sensor already enabled
162 // Are we deactivating this legacy sensor?
165 Sensor sensor = mSensorManager.getDefaultSensor(type);
166 if (sensor !
248 onAccuracyChanged(Sensor sensor, int accuracy) argument
286 mapSensorDataToWindow(int sensor, float[] values, int orientation) argument
[all...]
/frameworks/base/native/android/
H A Dsensor.cpp17 #define LOG_TAG "sensor"
21 #include <android/sensor.h>
108 int ASensorEventQueue_registerSensor(ASensorEventQueue* queue, ASensor const* sensor, argument
112 static_cast<Sensor const*>(sensor)->getHandle(), samplingPeriodUs,
116 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument
119 static_cast<Sensor const*>(sensor));
122 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument
125 static_cast<Sensor const*>(sensor));
128 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, argument
132 static_cast<Sensor const*>(sensor), us2n
165 ASensor_getName(ASensor const* sensor) argument
170 ASensor_getVendor(ASensor const* sensor) argument
175 ASensor_getType(ASensor const* sensor) argument
180 ASensor_getResolution(ASensor const* sensor) argument
185 ASensor_getMinDelay(ASensor const* sensor) argument
190 ASensor_getFifoMaxEventCount(ASensor const* sensor) argument
195 ASensor_getFifoReservedEventCount(ASensor const* sensor) argument
200 ASensor_getStringType(ASensor const* sensor) argument
205 ASensor_getReportingMode(ASensor const* sensor) argument
210 ASensor_isWakeUpSensor(ASensor const* 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 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 DSensorInterface.h50 BaseSensor(const sensor_t& sensor);
51 BaseSensor(const sensor_t& sensor, const uint8_t (&uuid)[16]);
77 HardwareSensor(const sensor_t& sensor);
78 HardwareSensor(const sensor_t& sensor, const uint8_t (&uuid)[16]);
H A DSensorService.cpp63 * - what about a gyro-corrected magnetic-field sensor?
64 * - run mag sensor from time to time to force calibration
65 * - gravity sensor length is wrong (=> drift in linear-acc sensor)
97 ALOGW("Can't generate HMAC key; dynamic sensor getId() will be wrong.");
114 ALOGW("Unable to write HMAC key; dynamic sensor getId() will change "
122 // Set main thread to SCHED_FIFO to lower sensor event latency when system is under load
225 // counts for each sensor.
342 // connections has called flush() and the underlying sensor has been disabled before a
382 // Default dump the sensor lis
774 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local
783 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local
873 Sensor sensor = initialSensorList[i]; local
963 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local
1136 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local
1217 sp<SensorInterface> sensor = getSensorInterfaceFromHandle(handle); local
1246 canAccessSensor(const Sensor& sensor, const char* operation, const String16& opPackageName) argument
[all...]
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';
H A DOrientationSensor.cpp33 const sensor_t sensor = { local
44 mSensor = Sensor(&sensor);
66 outEvent->sensor = '_ypr';
H A DSensorEventConnection.cpp216 int32_t sensor_handle = buffer[i].sensor;
218 ALOGD_IF(DEBUG_CONNECTIONS, "flush complete event sensor==%d ",
219 buffer[i].meta_data.sensor);
220 // Setting sensor_handle to the correct sensor to ensure the sensor events per
221 // connection are filtered correctly. buffer[i].sensor is zero for meta_data
223 sensor_handle = buffer[i].meta_data.sensor;
227 // Check if this connection has registered for this sensor. If not continue to the
235 // Check if there is a pending flush_complete event for this sensor on this connection.
239 ALOGD_IF(DEBUG_CONNECTIONS, "First flush event for sensor
618 const Sensor& sensor = si->getSensor(); local
[all...]
/frameworks/native/include/android/
H A Dsensor.h23 * @file sensor.h
46 * Structures and functions to receive and process sensor events in
93 * The light sensor value is returned in SI lux units.
100 * The proximity sensor which turns the screen off and back on during calls is the
101 * wake-up proximity sensor. Implement wake-up proximity sensor before implementing
102 * a non wake-up proximity sensor. For the wake-up proximity sensor set the flag
159 * A sensor event.
183 int32_t sensor; member in struct:AMetaDataEvent
227 int32_t sensor; member in struct:ASensorEvent
[all...]
/frameworks/native/libs/gui/
H A DSensorEventQueue.cpp34 #include <android/sensor.h>
127 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const {
128 return enableSensor(sensor, SENSOR_DELAY_NORMAL);
131 status_t SensorEventQueue::enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const { argument
132 return mSensorEventConnection->enableDisable(sensor->getHandle(), true,
136 status_t SensorEventQueue::disableSensor(Sensor const* sensor) const {
137 return mSensorEventConnection->enableDisable(sensor->getHandle(), false, 0, 0, 0);
154 status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const { argument
155 return mSensorEventConnection->setEventRate(sensor->getHandle(), ns);
181 // Send mNumAcksToSend to acknowledge for the wake up sensor event
[all...]
/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/native/include/gui/
H A DSensorEventQueue.h57 * Typical sensor delay (sample period) in microseconds.
65 // Default sensor sample period
82 status_t enableSensor(Sensor const* sensor) const;
83 status_t enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const;
84 status_t disableSensor(Sensor const* sensor) const;
85 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
92 // Send an ack for every wake_up sensor event that is set to WAKE_UP_SENSOR_EVENT_NEEDS_ACK.
/frameworks/base/core/jni/
H A Dandroid_hardware_SensorManager.cpp165 translateNativeSensorToJavaSensor(JNIEnv *env, jobject sensor, const Sensor& nativeSensor) { argument
168 if (sensor == NULL) {
169 // Sensor sensor = new Sensor();
170 sensor = env->NewObject(sensorOffsets.clazz, sensorOffsets.init, "");
173 if (sensor != NULL) {
179 env->SetObjectField(sensor, sensorOffsets.name, name);
180 env->SetObjectField(sensor, sensorOffsets.vendor, vendor);
181 env->SetIntField(sensor, sensorOffsets.version, nativeSensor.getVersion());
182 env->SetIntField(sensor, sensorOffsets.handle, nativeSensor.getHandle());
183 env->SetFloatField(sensor, sensorOffset
210 nativeGetSensorAtIndex(JNIEnv *env, jclass clazz, jlong sensorManager, jobject sensor, jint index) argument
235 jobject sensor = translateNativeSensorToJavaSensor(env, NULL, nativeList[i]); local
[all...]

Completed in 618 milliseconds

123