/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 | 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 | 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 | 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 493 public Sensor sensor; field in class:SensorEvent [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
|
H A D | SystemSensorManager.java | 46 Sensor sensor, int index); 83 // initialize the sensor list 85 Sensor sensor = new Sensor(); 86 if (!nativeGetSensorAtIndex(mNativeInstance, sensor, index)) break; 87 mFullSensorsList.add(sensor); 88 mHandleToSensor.append(sensor.getHandle(), sensor); 102 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, argument 104 if (listener == null || sensor == null) { 105 Log.e(TAG, "sensor o 45 nativeGetSensorAtIndex(long nativeInstance, Sensor sensor, int index) argument 144 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument 169 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument 197 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument 259 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) argument 321 addSensor( Sensor sensor, int delayUs, int maxBatchReportLatencyUs) argument 358 removeSensor(Sensor sensor, boolean disable) argument 401 enableSensor( Sensor sensor, int rateUs, int maxBatchReportLatencyUs) argument 414 disableSensor(Sensor sensor) argument 423 addSensorEvent(Sensor sensor) argument 424 removeSensorEvent(Sensor sensor) argument 438 addSensorEvent(Sensor sensor) argument 447 removeSensorEvent(Sensor sensor) argument 505 addSensorEvent(Sensor sensor) argument 514 removeSensorEvent(Sensor sensor) argument 572 addSensorEvent(Sensor sensor) argument 577 removeSensorEvent(Sensor sensor) argument [all...] |
H A D | SensorManager.java | 46 * is an example of a trigger sensor. 68 * public void onAccuracyChanged(Sensor sensor, int accuracy) { 91 // Legacy sensor manager implementation. Guarded by mSensorListByType during initialization. 94 /* NOTE: sensor IDs must be a power of 2 */ 97 * A constant describing an orientation sensor. See 115 * A constant describing a temperature sensor See 124 * A constant describing a magnetic sensor See 133 * A constant describing an ambient light sensor See 142 * A constant describing a proximity sensor See 160 * A constant describing an orientation sensor 602 unregisterListener(SensorEventListener listener, Sensor sensor) argument 629 unregisterListenerImpl(SensorEventListener listener, Sensor sensor) argument 683 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs) argument 740 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, int maxReportLatencyUs) argument 775 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, Handler handler) argument 806 registerListener(SensorEventListener listener, Sensor sensor, int samplingPeriodUs, int maxReportLatencyUs, Handler handler) argument 813 registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, Handler handler, int maxReportLatencyUs, int reservedFlags) argument 1524 requestTriggerSensor(TriggerEventListener listener, Sensor sensor) argument 1531 requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) argument 1556 cancelTriggerSensor(TriggerEventListener listener, Sensor sensor) argument 1563 cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, boolean disable) argument 1623 injectSensorData(Sensor sensor, float[] values, int accuracy, long timestamp) argument 1652 injectSensorDataImpl(Sensor sensor, float[] values, int accuracy, long timestamp) 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...] |
/frameworks/base/native/android/ |
H A D | sensor.cpp | 17 #define LOG_TAG "sensor" 21 #include <android/sensor.h> 112 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument 115 static_cast<Sensor const*>(sensor)); 118 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor) argument 121 static_cast<Sensor const*>(sensor)); 124 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, argument 128 static_cast<Sensor const*>(sensor), us2ns(usec)); 161 const char* ASensor_getName(ASensor const* sensor) argument 163 return static_cast<Sensor const*>(sensor) 166 ASensor_getVendor(ASensor const* sensor) argument 171 ASensor_getType(ASensor const* sensor) argument 176 ASensor_getResolution(ASensor const* sensor) argument 181 ASensor_getMinDelay(ASensor const* sensor) argument 186 ASensor_getFifoMaxEventCount(ASensor const* sensor) argument 191 ASensor_getFifoReservedEventCount(ASensor const* sensor) argument 196 ASensor_getStringType(ASensor const* sensor) argument 201 ASensor_getReportingMode(ASensor const* sensor) argument 206 ASensor_isWakeUpSensor(ASensor const* sensor) argument [all...] |
H A D | Android.mk | 17 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) 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 209 * Get a reference to the sensor manager. ASensorManager is a singleton 225 * Returns the default sensor for the given type, or NULL if no sensor 231 * Returns the default sensor wit [all...] |
/frameworks/native/services/sensorservice/ |
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 | SensorService.cpp | 61 * - what about a gyro-corrected magnetic-field sensor? 62 * - run mag sensor from time to time to force calibration 63 * - gravity sensor length is wrong (=> drift in linear-acc sensor) 123 // build the sensor list returned to users 150 // the orientation sensor and remove the HAL provided one. 159 // debugging sensor list 163 // counts for each sensor. 221 const Sensor sensor(s->getSensor()); 222 // add to the sensor lis 234 Sensor sensor = registerSensor(s); local 450 SensorInterface* sensor = mSensorMap.valueFor(handle); local 700 SensorInterface* sensor = mSensorMap.valueFor(handle); local 709 SensorInterface* sensor = mSensorMap.valueFor(handle); local 725 Sensor sensor = initialSensorList[i]; local 795 SensorInterface* sensor = mSensorMap.valueFor( handle ); local 968 SensorInterface* sensor = mSensorMap.valueFor(handle); local 1052 SensorInterface* sensor = mSensorMap.valueFor(handle); local 1078 canAccessSensor(const Sensor& sensor, const char* operation, const String16& opPackageName) argument 1883 Sensor sensor = mService->getSensorFromHandle(sensor_event.sensor); local 1928 const Sensor& sensor = mService->getSensorFromHandle(mSensorInfo.keyAt(i)); local [all...] |
H A D | SensorInterface.cpp | 31 HardwareSensor::HardwareSensor(const sensor_t& sensor) argument 33 mSensor(&sensor, mSensorDevice.getHalDeviceVersion())
|
H A D | LinearAccelerationSensor.cpp | 46 outEvent->sensor = '_lin'; 73 Sensor sensor(&hwSensor); 74 return sensor;
|
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 | 60 outEvent->sensor = '_ypr'; 87 Sensor sensor(&hwSensor); 88 return sensor;
|
/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/libs/gui/ |
H A D | SensorEventQueue.cpp | 34 #include <android/sensor.h> 127 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const { 128 return mSensorEventConnection->enableDisable(sensor->getHandle(), true, 0, 0, false); 131 status_t SensorEventQueue::disableSensor(Sensor const* sensor) const { 132 return mSensorEventConnection->enableDisable(sensor->getHandle(), false, 0, 0, false); 149 status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const { argument 150 return mSensorEventConnection->setEventRate(sensor->getHandle(), ns); 176 // Send mNumAcksToSend to acknowledge for the wake up sensor events received.
|
/frameworks/base/core/jni/ |
H A D | android_hardware_SensorManager.cpp | 145 nativeGetSensorAtIndex(JNIEnv *env, jclass clazz, jlong sensorManager, jobject sensor, jint index) argument 160 env->SetObjectField(sensor, sensorOffsets.name, name); 161 env->SetObjectField(sensor, sensorOffsets.vendor, vendor); 162 env->SetIntField(sensor, sensorOffsets.version, list->getVersion()); 163 env->SetIntField(sensor, sensorOffsets.handle, list->getHandle()); 164 env->SetFloatField(sensor, sensorOffsets.range, list->getMaxValue()); 165 env->SetFloatField(sensor, sensorOffsets.resolution, list->getResolution()); 166 env->SetFloatField(sensor, sensorOffsets.power, list->getPowerUsage()); 167 env->SetIntField(sensor, sensorOffsets.minDelay, list->getMinDelay()); 168 env->SetIntField(sensor, sensorOffset [all...] |
/frameworks/native/include/gui/ |
H A D | SensorEventQueue.h | 70 status_t enableSensor(Sensor const* sensor) const; 71 status_t disableSensor(Sensor const* sensor) const; 72 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const; 79 // Send an ack for every wake_up sensor event that is set to WAKE_UP_SENSOR_EVENT_NEEDS_ACK.
|
/frameworks/base/core/java/com/android/internal/os/ |
H A D | SensorPowerCalculator.java | 41 final BatteryStats.Uid.Sensor sensor = sensorStats.valueAt(ise); 43 final BatteryStats.Timer timer = sensor.getSensorTime();
|
/frameworks/native/include/binder/ |
H A D | IBatteryStats.h | 31 virtual void noteStartSensor(int uid, int sensor) = 0; 32 virtual void noteStopSensor(int uid, int sensor) = 0;
|
/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); 146 int sensor = data.readInt32(); local 147 noteStartSensor(uid, sensor); 154 int sensor = data.readInt32(); local 155 noteStopSensor(uid, sensor);
|