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

12

/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 DSensorEventListener.java21 * sensor values have changed.
26 * Called when sensor values have changed.
28 * for details on possible sensor types.
42 * Called when the accuracy of a sensor has changed.
46 * @param accuracy The new accuracy of this sensor
48 public void onAccuracyChanged(Sensor sensor, int accuracy); argument
H A DSystemSensorManager.java41 /* The thread and the sensor list are global to the process
51 // Common pool of sensor events.
104 //Log.d(TAG, "entering main sensor thread");
122 final int sensor = sensors_data_poll(sQueue, values, status, timestamp);
126 if (sensor == -1 || sListeners.isEmpty()) {
129 if (sensor == -1 && !sListeners.isEmpty()) {
131 Log.e(TAG, "_sensors_data_poll() failed, we bail out: sensors=" + sensor);
139 final Sensor sensorObject = sHandleToSensor.get(sensor);
141 // report the sensor event to all listeners that
156 //Log.d(TAG, "exiting main sensor threa
171 ListenerDelegate(SensorEventListener listener, Sensor sensor, Handler handler) argument
215 addSensor(Sensor sensor) argument
219 removeSensor(Sensor sensor) argument
224 hasSensor(Sensor sensor) argument
231 onSensorChangedLocked(Sensor sensor, float[] values, long[] timestamp, int accuracy) argument
288 enableSensorLocked(Sensor sensor, int delay) argument
301 disableSensorLocked(Sensor sensor) argument
315 registerListenerImpl(SensorEventListener listener, Sensor sensor, int delay, Handler handler) argument
364 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
391 sensors_module_get_next_sensor(Sensor sensor, int next) argument
396 sensors_enable_sensor(int queue, String name, int sensor, int enable) argument
[all...]
H A DSensorEvent.java22 * holds informations such as the sensor's type, the time-stamp, accuracy and of
23 * course the sensor's {@link SensorEvent#values data}.
62 * which {@link android.hardware.Sensor sensor} type is being monitored (see
82 * A sensor of this type measures the acceleration applied to the device
84 * sensor itself (<b>Fs</b>) using the relation:
160 * same as is used for the acceleration sensor. Rotation is positive in the
251 * values[0]: Proximity sensor distance measured in centimeters
256 * <i>far</i> measurement. In this case, the sensor should report its
263 * are m/s^2. The coordinate system is the same as is used by the acceleration sensor.</p>
264 * <p><b>Note:</b> When the device is at rest, the output of the gravity sensor shoul
440 public Sensor sensor; field in class:SensorEvent
[all...]
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...]
H A DSensorManager.java62 * public void onAccuracyChanged(Sensor sensor, int accuracy) {
85 // Legacy sensor manager implementation. Guarded by mSensorListByType during initialization.
88 /* NOTE: sensor IDs must be a power of 2 */
91 * A constant describing an orientation sensor. See
109 * A constant describing a temperature sensor See
118 * A constant describing a magnetic sensor See
127 * A constant describing an ambient light sensor See
136 * A constant describing a proximity sensor See
154 * A constant describing an orientation sensor. See
171 * Smallest sensor I
528 unregisterListener(SensorEventListener listener, Sensor sensor) argument
555 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
585 registerListener(SensorEventListener listener, Sensor sensor, int rate) argument
621 registerListener(SensorEventListener listener, Sensor sensor, int rate, Handler handler) argument
650 registerListenerImpl(SensorEventListener listener, Sensor sensor, int delay, Handler handler) argument
[all...]
/frameworks/base/native/android/
H A Dsensor.cpp17 #define LOG_TAG "sensor"
21 #include <android/sensor.h>
86 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument
89 static_cast<Sensor const*>(sensor));
92 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument
95 static_cast<Sensor const*>(sensor));
98 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, argument
102 static_cast<Sensor const*>(sensor), us2ns(usec));
132 const char* ASensor_getName(ASensor const* sensor) argument
134 return static_cast<Sensor const*>(sensor)
137 ASensor_getVendor(ASensor const* sensor) argument
142 ASensor_getType(ASensor const* sensor) argument
147 ASensor_getResolution(ASensor const* sensor) argument
152 ASensor_getMinDelay(ASensor const* sensor) argument
[all...]
H A DAndroid.mk16 sensor.cpp \
/frameworks/native/include/android/
H A Dsensor.h38 * Structures and functions to receive and process sensor events in
54 * (keep in sync with hardware/sensor.h)
87 * A sensor event.
112 int32_t sensor; member in struct:ASensorEvent
144 * Get a reference to the sensor manager. ASensorManager is a singleton.
160 * Returns the default sensor for the given type, or NULL if no sensor
166 * Creates a new sensor event queue and associate it with a looper.
180 * Enable the selected sensor. Returns a negative error code on failure.
182 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor);
[all...]
/frameworks/base/services/sensorservice/
H A DSensorInterface.cpp33 HardwareSensor::HardwareSensor(const sensor_t& sensor) argument
35 mSensor(&sensor)
37 ALOGI("%s", sensor.name);
H A DRotationVectorSensor.cpp47 outEvent->sensor = '_rov';
74 Sensor sensor(&hwSensor);
75 return sensor;
96 outEvent->sensor = '_gbs';
123 Sensor sensor(&hwSensor);
124 return sensor;
H A DLinearAccelerationSensor.cpp46 outEvent->sensor = '_lin';
73 Sensor sensor(&hwSensor);
74 return sensor;
H A DSensorService.cpp56 * - what about a gyro-corrected magnetic-field sensor?
57 * - run mag sensor from time to time to force calibration
58 * - gravity sensor length is wrong (=> drift in linear-acc sensor)
129 // build the sensor list returned to users
133 // if we have the fancy sensor fusion, and it's not provided by the
134 // HAL, use our own (fused) orientation sensor by removing the
152 const Sensor sensor(s->getSensor());
153 // add to the sensor list (returned to clients)
154 mSensorList.add(sensor);
380 SensorInterface* sensor = mSensorMap.valueFor( handle ); local
412 SensorInterface* sensor = mSensorMap.valueFor(handle); local
472 SensorInterface* sensor = mSensorMap.valueFor(handle); local
[all...]
H A DCorrectedGyroSensor.cpp53 outEvent->sensor = '_cgy';
80 Sensor sensor(&hwSensor);
81 return sensor;
H A DGravitySensor.cpp55 // translates to an offset in the linear-acceleration sensor.
62 outEvent->sensor = '_grv';
88 Sensor sensor(&hwSensor);
89 return sensor;
H A DOrientationSensor.cpp57 outEvent->sensor = '_ypr';
84 Sensor sensor(&hwSensor);
85 return sensor;
H A DSensorInterface.h53 HardwareSensor(const sensor_t& sensor);
/frameworks/native/libs/gui/
H A DSensorEventQueue.cpp31 #include <android/sensor.h>
109 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const {
110 return mSensorEventConnection->enableDisable(sensor->getHandle(), true);
113 status_t SensorEventQueue::disableSensor(Sensor const* sensor) const {
114 return mSensorEventConnection->enableDisable(sensor->getHandle(), false);
129 status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const { argument
130 return mSensorEventConnection->setEventRate(sensor->getHandle(), ns);
/frameworks/base/core/jni/
H A Dandroid_hardware_SensorManager.cpp57 sensors_module_get_next_sensor(JNIEnv *env, jobject clazz, jobject sensor, jint next) argument
70 env->SetObjectField(sensor, sensorOffsets.name, name);
71 env->SetObjectField(sensor, sensorOffsets.vendor, vendor);
72 env->SetIntField(sensor, sensorOffsets.version, list->getVersion());
73 env->SetIntField(sensor, sensorOffsets.handle, list->getHandle());
74 env->SetIntField(sensor, sensorOffsets.type, list->getType());
75 env->SetFloatField(sensor, sensorOffsets.range, list->getMaxValue());
76 env->SetFloatField(sensor, sensorOffsets.resolution, list->getResolution());
77 env->SetFloatField(sensor, sensorOffsets.power, list->getPowerUsage());
78 env->SetIntField(sensor, sensorOffset
104 sensors_enable_sensor(JNIEnv *env, jclass clazz, jint nativeQueue, jstring name, jint sensor, jint delay) argument
[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.h66 status_t enableSensor(Sensor const* sensor) const;
67 status_t disableSensor(Sensor const* sensor) const;
68 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
H A DSensor.h30 #include <android/sensor.h>
/frameworks/base/core/java/com/android/internal/app/
H A DIBatteryStats.aidl31 void noteStartSensor(int uid, int sensor);
35 void noteStopSensor(int uid, int sensor);
/frameworks/base/tests/RenderScriptTests/Balls/src/com/example/android/rs/balls/
H A DBalls.java60 //android.util.Log.d("rs", "sensor: " + event.sensor + ", x: " + event.values[0] + ", y: " + event.values[1] + ", z: " + event.values[2]);
62 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
70 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument
/frameworks/base/core/java/android/webkit/
H A DDeviceMotionService.java160 assert(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER);
175 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument

Completed in 1151 milliseconds

12