/frameworks/base/core/java/android/hardware/ |
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 | Sensor.java | 23 * Class representing a sensor. Use {@link SensorManager#getSensorList} to get 34 * A constant describing an accelerometer sensor type. 41 * A constant string describing an accelerometer sensor type. 45 public static final String STRING_TYPE_ACCELEROMETER = "android.sensor.accelerometer"; 48 * A constant describing a magnetic field sensor type. 55 * A constant string describing a magnetic field sensor type. 59 public static final String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field"; 62 * A constant describing an orientation sensor type. 73 * A constant string describing an orientation sensor type. 80 public static final String STRING_TYPE_ORIENTATION = "android.sensor 610 getMaxLengthValuesArray(Sensor sensor, int sdkLevel) argument [all...] |
H A D | SensorEvent.java | 21 * 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 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 the registered sensor has changed. 47 * @param accuracy The new accuracy of this sensor, one of 50 public void onAccuracyChanged(Sensor sensor, int accuracy); argument
|
H A D | SensorEventListener2.java | 25 * 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 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 | SensorManager.java | 44 * 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 599 unregisterListener(SensorEventListener listener, Sensor sensor) argument 626 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument 680 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs) argument 737 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, int maxReportLatencyUs) argument 772 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, Handler handler) argument 803 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, int maxReportLatencyUs, Handler handler) argument 810 registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, Handler handler, int maxReportLatencyUs, int reservedFlags) argument 1514 requestTriggerSensor(TriggerEventListener listener, Sensor sensor) argument 1521 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument 1546 cancelTriggerSensor(TriggerEventListener listener, Sensor sensor) argument 1553 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument [all...] |
H A D | SystemSensorManager.java | 41 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 delayUs, Handler handler, int maxBatchReportLatencyUs, int reservedFlags) argument 134 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument 159 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument 182 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument 250 addSensor( Sensor sensor, int delayUs, int maxBatchReportLatencyUs, int reservedFlags) argument 287 removeSensor(Sensor sensor, boolean disable) argument 330 enableSensor( Sensor sensor, int rateUs, int maxBatchReportLatencyUs, int reservedFlags) argument 338 disableSensor(Sensor sensor) argument 347 addSensorEvent(Sensor sensor) argument 348 removeSensorEvent(Sensor sensor) argument 362 addSensorEvent(Sensor sensor) argument 371 removeSensorEvent(Sensor sensor) argument 429 addSensorEvent(Sensor sensor) argument 438 removeSensorEvent(Sensor sensor) argument [all...] |
H A D | TriggerEvent.java | 21 * 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
|
/frameworks/base/core/java/android/view/ |
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 | 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/base/core/java/com/android/internal/os/ |
H A D | BatteryStatsImpl.java | 2962 public void noteStartSensorLocked(int uid, int sensor) { argument 2968 if (DEBUG_HISTORY) Slog.v(TAG, "Start sensor to: " 2973 getUidStatsLocked(uid).noteStartSensor(sensor, elapsedRealtime); 2976 public void noteStopSensorLocked(int uid, int sensor) { argument 2983 if (DEBUG_HISTORY) Slog.v(TAG, "Stop sensor to: " 2987 getUidStatsLocked(uid).noteStopSensor(sensor, elapsedRealtime); 4242 * The statistics we have collected for this uid's sensor activations. 4958 Uid.Sensor sensor = mSensorStats.valueAt(ise); 4959 sensor.writeToParcelLocked(out, elapsedRealtimeUs); 5095 Uid.Sensor sensor 6271 getSensorTimerLocked(int sensor, boolean create) argument 6365 noteStartSensor(int sensor, long elapsedRealtimeMs) argument 6372 noteStopSensor(int sensor, long elapsedRealtimeMs) argument [all...] |
/frameworks/base/core/jni/ |
H A D | android_hardware_SensorManager.cpp | 88 nativeGetNextSensor(JNIEnv *env, jclass clazz, jobject sensor, jint next) argument 103 env->SetObjectField(sensor, sensorOffsets.name, name); 104 env->SetObjectField(sensor, sensorOffsets.vendor, vendor); 105 env->SetIntField(sensor, sensorOffsets.version, list->getVersion()); 106 env->SetIntField(sensor, sensorOffsets.handle, list->getHandle()); 107 env->SetIntField(sensor, sensorOffsets.type, list->getType()); 108 env->SetFloatField(sensor, sensorOffsets.range, list->getMaxValue()); 109 env->SetFloatField(sensor, sensorOffsets.resolution, list->getResolution()); 110 env->SetFloatField(sensor, sensorOffsets.power, list->getPowerUsage()); 111 env->SetIntField(sensor, sensorOffset [all...] |
/frameworks/base/native/android/ |
H A D | sensor.cpp | 17 #define LOG_TAG "sensor" 21 #include <android/sensor.h> 99 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument 102 static_cast<Sensor const*>(sensor)); 105 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument 108 static_cast<Sensor const*>(sensor)); 111 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, argument 115 static_cast<Sensor const*>(sensor), us2ns(usec)); 148 const char* ASensor_getName(ASensor const* sensor) argument 150 return static_cast<Sensor const*>(sensor) 153 ASensor_getVendor(ASensor const* sensor) argument 158 ASensor_getType(ASensor const* sensor) argument 163 ASensor_getResolution(ASensor const* sensor) argument 168 ASensor_getMinDelay(ASensor const* sensor) argument 173 ASensor_getFifoMaxEventCount(ASensor const* sensor) argument 178 ASensor_getFifoReservedEventCount(ASensor const* sensor) argument 183 ASensor_getStringType(ASensor const* sensor) argument 188 ASensor_getReportingMode(ASensor const* sensor) argument 193 ASensor_isWakeUpSensor(ASensor const* sensor) argument [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/ |
H A D | DozeService.java | 407 .append(event.sensor.getName()); 539 updateListener(); // reregister, this sensor only fires once 578 final Sensor sensor = mSensors.getDefaultSensor(Sensor.TYPE_PROXIMITY); 579 if (sensor == null) { 580 if (DEBUG) Log.d(mTag, "No sensor found"); 584 // the pickup sensor interferes with the prox event, disable it until we have a result 587 mMaxRange = sensor.getMaximumRange(); 588 mSensors.registerListener(this, sensor, SensorManager.SENSOR_DELAY_NORMAL, 0, mHandler); 616 // we're done - reenable the pickup sensor 625 public void onAccuracyChanged(Sensor sensor, in argument [all...] |
/frameworks/base/policy/src/com/android/internal/policy/impl/ |
H A D | WindowOrientationListener.java | 68 * @param handler Provides the Looper for receiving sensor updates. 78 * @param handler Provides the Looper for receiving sensor updates. 79 * @param rate at which sensor events are processed (see also 99 * Enables the WindowOrientationListener so it will monitor the sensor and call 167 * Returns true if sensor is enabled and false otherwise 247 // Indices into SensorEvent.values for the accelerometer sensor. 430 public void onAccuracyChanged(Sensor sensor, int accuracy) { argument 493 Slog.v(TAG, "Ignoring sensor data, magnitude too close to zero."); 533 Slog.v(TAG, "Ignoring sensor data, device is overhead: " 539 Slog.v(TAG, "Ignoring sensor dat [all...] |
/frameworks/base/services/core/java/com/android/server/am/ |
H A D | BatteryStatsService.java | 294 public void noteStartSensor(int uid, int sensor) { argument 297 mStats.noteStartSensorLocked(uid, sensor); 301 public void noteStopSensor(int uid, int sensor) { argument 304 mStats.noteStopSensorLocked(uid, sensor);
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
H A D | MotionSensor.java | 17 // Make values from a motion sensor (e.g., accelerometer) available as filter outputs. 57 // TODO: currently, the type of sensor is hardcoded. Should be able to set the sensor 68 public final void onAccuracyChanged(Sensor sensor, int accuracy) { argument 69 // (Do we need to do something when sensor accuracy changes?)
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/ |
H A D | MotionSensorWTime.java | 17 // Make values from a motion sensor (e.g., accelerometer) available as filter outputs. 63 // TODO: currently, the type of sensor is hardcoded. Should be able to set the sensor 74 public final void onAccuracyChanged(Sensor sensor, int accuracy) { argument 75 // (Do we need to do something when sensor accuracy changes?)
|
/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/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) 98 * A sensor event. 122 int32_t sensor; member in struct:AMetaDataEvent 152 int32_t sensor; member in struct:ASensorEvent 196 * Get a reference to the sensor manager. ASensorManager is a singleton. 212 * Returns the default sensor for the given type, or NULL if no sensor 218 * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor [all...] |
/frameworks/native/libs/binder/ |
H A D | IBatteryStats.cpp | 37 virtual void noteStartSensor(int uid, int sensor) { argument 41 data.writeInt32(sensor); 45 virtual void noteStopSensor(int uid, int sensor) { argument 49 data.writeInt32(sensor); 105 int sensor = data.readInt32(); local 106 noteStartSensor(uid, sensor); 113 int sensor = data.readInt32(); local 114 noteStopSensor(uid, sensor);
|
/frameworks/native/libs/gui/ |
H A D | SensorEventQueue.cpp | 32 #include <android/sensor.h> 123 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const { 124 return mSensorEventConnection->enableDisable(sensor->getHandle(), true, 0, 0, false); 127 status_t SensorEventQueue::disableSensor(Sensor const* sensor) const { 128 return mSensorEventConnection->enableDisable(sensor->getHandle(), false, 0, 0, false); 145 status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const { argument 146 return mSensorEventConnection->setEventRate(sensor->getHandle(), ns); 155 // Send mNumAcksToSend to acknowledge for the wake up sensor events received.
|
/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/native/services/sensorservice/ |
H A D | SensorInterface.cpp | 31 HardwareSensor::HardwareSensor(const sensor_t& sensor) argument 33 mSensor(&sensor, mSensorDevice.getHalDeviceVersion())
|