/frameworks/base/core/java/android/hardware/ |
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 | 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 | 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 | 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 | 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 | 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/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
|
H A D | OrientationEventListener.java | 63 * @param rate at which sensor events are processed (see also 83 * Enables the OrientationEventListener so it will monitor the sensor and call 147 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument 153 * Returns true if sensor is enabled and false otherwise
|
H A D | WindowOrientationListener.java | 70 * @param rate at which sensor events are processed (see also 89 * Enables the WindowOrientationListener so it will monitor the sensor and call 148 * Returns true if sensor is enabled and false otherwise 211 // Indices into SensorEvent.values for the accelerometer sensor. 374 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument 432 Slog.v(TAG, "Ignoring sensor data, magnitude too close to zero."); 466 Slog.v(TAG, "Ignoring sensor data, tilt angle too high: " 503 Slog.v(TAG, "Ignoring sensor data, no predicted rotation: "
|
/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 | 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...] |
/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/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/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
|
H A D | DeviceOrientationService.java | 197 switch (event.sensor.getType()) { 222 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument
|
/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/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/ |
H A D | SimpleModelView.java | 55 // find the rotation-vector sensor 171 // we received a sensor event. it is a good practice to check 174 if (event.sensor.getType() == Sensor.TYPE_ROTATION_VECTOR) { 188 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument
|
/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...] |
/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/opengl/tests/gl2_cameraeye/src/com/android/gl2cameraeye/ |
H A D | GL2CameraEye.java | 117 if (event.sensor.getType() == Sensor.TYPE_LINEAR_ACCELERATION) { 126 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument 127 // Ignoring sensor accuracy changes.
|
/frameworks/base/services/java/com/android/server/am/ |
H A D | BatteryStatsService.java | 133 public void noteStartSensor(int uid, int sensor) { argument 136 mStats.noteStartSensorLocked(uid, sensor); 140 public void noteStopSensor(int uid, int sensor) { argument 143 mStats.noteStopSensorLocked(uid, sensor);
|
/frameworks/base/core/java/com/android/internal/os/ |
H A D | BatteryStatsImpl.java | 1710 public void noteStartSensorLocked(int uid, int sensor) { argument 1713 if (DEBUG_HISTORY) Slog.v(TAG, "Start sensor to: " 1718 getUidStatsLocked(uid).noteStartSensor(sensor); 1721 public void noteStopSensorLocked(int uid, int sensor) { argument 1725 if (DEBUG_HISTORY) Slog.v(TAG, "Stop sensor to: " 1729 getUidStatsLocked(uid).noteStopSensor(sensor); 2413 * The statistics we have collected for this uid's sensor activations. 2860 Uid.Sensor sensor = sensorEntry.getValue(); 2861 sensor.writeToParcelLocked(out, batteryRealtime); 2947 Uid.Sensor sensor 3986 getSensorTimerLocked(int sensor, boolean create) argument 4050 noteStartSensor(int sensor) argument 4057 noteStopSensor(int sensor) argument [all...] |