Searched refs:sensor (Results 1 - 25 of 39) 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 private static native int nativeGetNextSensor(Sensor sensor, int next); argument
68 // initialize the sensor list
72 Sensor sensor = new Sensor();
73 i = nativeGetNextSensor(sensor, i);
75 //Log.d(TAG, "found sensor: " + sensor.getName() +
76 // ", handle=" + sensor.getHandle());
77 fullList.add(sensor);
78 sHandleToSensor.append(sensor.getHandle(), sensor);
95 registerListenerImpl(SensorEventListener listener, Sensor sensor, int delay, Handler handler) argument
126 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
151 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument
174 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument
228 addSensor(Sensor sensor, int delay) argument
260 removeSensor(Sensor sensor, boolean disable) argument
298 enableSensor(Sensor sensor, int us) argument
303 disableSensor(Sensor sensor) argument
311 addSensorEvent(Sensor sensor) argument
312 removeSensorEvent(Sensor sensor) argument
325 addSensorEvent(Sensor sensor) argument
331 removeSensorEvent(Sensor sensor) argument
385 addSensorEvent(Sensor sensor) argument
391 removeSensorEvent(Sensor sensor) argument
[all...]
H A DSensorEvent.java21 * holds informations 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
491 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 DSensor.java23 * Class representing a sensor. Use {@link SensorManager#getSensorList} to get
34 * A constant describing an accelerometer sensor type.
41 * A constant describing a magnetic field sensor type.
48 * A constant describing an orientation sensor type.
58 /** A constant describing a gyroscope sensor type.
64 * A constant describing a light sensor type.
70 /** A constant describing a pressure sensor type.
76 * A constant describing a temperature sensor type
86 * A constant describing a proximity sensor type.
93 * A constant describing a gravity sensor typ
222 getReportingMode(Sensor sensor) argument
227 getMaxLengthValuesArray(Sensor sensor, int sdkLevel) argument
[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.java44 * is an example of a trigger sensor.
66 * public void onAccuracyChanged(Sensor sensor, int accuracy) {
89 // Legacy sensor manager implementation. Guarded by mSensorListByType during initialization.
92 /* NOTE: sensor IDs must be a power of 2 */
95 * A constant describing an orientation sensor. See
113 * A constant describing a temperature sensor See
122 * A constant describing a magnetic sensor See
131 * A constant describing an ambient light sensor See
140 * A constant describing a proximity sensor See
158 * A constant describing an orientation sensor
539 unregisterListener(SensorEventListener listener, Sensor sensor) argument
566 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument
606 registerListener(SensorEventListener listener, Sensor sensor, int rate) argument
652 registerListener(SensorEventListener listener, Sensor sensor, int rate, Handler handler) argument
681 registerListenerImpl(SensorEventListener listener, Sensor sensor, int delay, Handler handler) argument
1357 requestTriggerSensor(TriggerEventListener listener, Sensor sensor) argument
1364 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument
1389 cancelTriggerSensor(TriggerEventListener listener, Sensor sensor) argument
1396 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) 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/native/services/sensorservice/
H A DSensorInterface.cpp33 HardwareSensor::HardwareSensor(const sensor_t& sensor) argument
35 mSensor(&sensor)
37 ALOGI("%s", sensor.name);
H A DSensorService.cpp58 * - what about a gyro-corrected magnetic-field sensor?
59 * - run mag sensor from time to time to force calibration
60 * - gravity sensor length is wrong (=> drift in linear-acc sensor)
126 // build the sensor list returned to users
136 // if we have the fancy sensor fusion, and it's not provided by the
137 // HAL, use our own (fused) orientation sensor by removing the
144 // debugging sensor list
171 const Sensor sensor(s->getSensor());
172 // add to the sensor lis
245 SensorInterface* sensor; local
465 SensorInterface* sensor = mSensorMap.valueFor( handle ); local
556 SensorInterface* sensor = mSensorMap.valueFor(handle); local
[all...]
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 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.h54 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/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;
/frameworks/base/core/jni/
H A Dandroid_hardware_SensorManager.cpp73 nativeGetNextSensor(JNIEnv *env, jclass clazz, jobject sensor, jint next) argument
86 env->SetObjectField(sensor, sensorOffsets.name, name);
87 env->SetObjectField(sensor, sensorOffsets.vendor, vendor);
88 env->SetIntField(sensor, sensorOffsets.version, list->getVersion());
89 env->SetIntField(sensor, sensorOffsets.handle, list->getHandle());
90 env->SetIntField(sensor, sensorOffsets.type, list->getType());
91 env->SetFloatField(sensor, sensorOffsets.range, list->getMaxValue());
92 env->SetFloatField(sensor, sensorOffsets.resolution, list->getResolution());
93 env->SetFloatField(sensor, sensorOffsets.power, list->getPowerUsage());
94 env->SetIntField(sensor, sensorOffset
[all...]
/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/rs/java/tests/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

Completed in 1232 milliseconds

12