/frameworks/base/core/java/android/hardware/ |
H A D | SensorListener.java | 21 * 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 D | SensorEventListener.java | 21 * 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 D | SystemSensorManager.java | 41 /* 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 D | SensorEvent.java | 22 * 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 D | LegacySensorManager.java | 29 * 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 D | SensorManager.java | 62 * 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 D | sensor.cpp | 17 #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 D | Android.mk | 16 sensor.cpp \
|
/frameworks/native/include/android/ |
H A D | sensor.h | 38 * 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 D | SensorInterface.cpp | 33 HardwareSensor::HardwareSensor(const sensor_t& sensor) argument 35 mSensor(&sensor) 37 ALOGI("%s", sensor.name);
|
H A D | RotationVectorSensor.cpp | 47 outEvent->sensor = '_rov'; 74 Sensor sensor(&hwSensor); 75 return sensor; 96 outEvent->sensor = '_gbs'; 123 Sensor sensor(&hwSensor); 124 return sensor;
|
H A D | LinearAccelerationSensor.cpp | 46 outEvent->sensor = '_lin'; 73 Sensor sensor(&hwSensor); 74 return sensor;
|
H A D | SensorService.cpp | 57 * - what about a gyro-corrected magnetic-field sensor? 58 * - run mag sensor from time to time to force calibration 59 * - gravity sensor length is wrong (=> drift in linear-acc sensor) 123 // 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 141 // debugging sensor list 168 const Sensor sensor(s->getSensor()); 169 // add to the sensor lis 402 SensorInterface* sensor = mSensorMap.valueFor( handle ); local 435 SensorInterface* sensor = mSensorMap.valueFor(handle); local 501 SensorInterface* sensor = mSensorMap.valueFor(handle); local [all...] |
H A D | CorrectedGyroSensor.cpp | 53 outEvent->sensor = '_cgy'; 80 Sensor sensor(&hwSensor); 81 return sensor;
|
H A D | GravitySensor.cpp | 55 // translates to an offset in the linear-acceleration sensor. 62 outEvent->sensor = '_grv'; 88 Sensor sensor(&hwSensor); 89 return sensor;
|
H A D | OrientationSensor.cpp | 57 outEvent->sensor = '_ypr'; 84 Sensor sensor(&hwSensor); 85 return sensor;
|
H A D | SensorInterface.h | 53 HardwareSensor(const sensor_t& sensor);
|
/frameworks/native/libs/gui/ |
H A D | SensorEventQueue.cpp | 31 #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 D | android_hardware_SensorManager.cpp | 57 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 D | OrientationListener.java | 53 * @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 D | SensorEventQueue.h | 66 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 D | Sensor.h | 30 #include <android/sensor.h>
|
/frameworks/base/core/java/com/android/internal/app/ |
H A D | IBatteryStats.aidl | 31 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 D | Balls.java | 60 //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 D | DeviceMotionService.java | 160 assert(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER); 175 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument
|