/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 | 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 | 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 | 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 | 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 | 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 | 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...] |
/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...] |
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) 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/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 | SensorInterface.cpp | 31 HardwareSensor::HardwareSensor(const sensor_t& sensor) argument 33 mSensor(&sensor, mSensorDevice.getHalDeviceVersion())
|
H A D | SensorService.cpp | 60 * - what about a gyro-corrected magnetic-field sensor? 61 * - run mag sensor from time to time to force calibration 62 * - gravity sensor length is wrong (=> drift in linear-acc sensor) 115 // build the sensor list returned to users 142 // the orientation sensor and remove the HAL provided one. 151 // debugging sensor list 155 // counts for each sensor. 207 const Sensor sensor(s->getSensor()); 208 // add to the sensor lis 220 Sensor sensor = registerSensor(s); local 366 SensorInterface* sensor = mSensorMap.valueFor(handle); local 620 SensorInterface* sensor = mSensorMap.valueFor(handle); local 629 SensorInterface* sensor = mSensorMap.valueFor(handle); local 646 Sensor sensor = initialSensorList[i]; local 678 SensorInterface* sensor = mSensorMap.valueFor( handle ); local 822 SensorInterface* sensor = mSensorMap.valueFor(handle); local 891 SensorInterface* sensor = mSensorMap.valueFor(handle); local 913 canAccessSensor(const Sensor& sensor) argument 918 verifyCanAccessSensor(const Sensor& sensor, const char* operation) argument 1570 const Sensor& sensor = mService->getSensorFromHandle(mSensorInfo.keyAt(i)); local [all...] |
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/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); 105 int sensor = data.readInt32(); local 106 noteStartSensor(uid, sensor); 113 int sensor = data.readInt32(); local 114 noteStopSensor(uid, sensor);
|
/frameworks/native/include/gui/ |
H A D | SensorEventQueue.h | 69 status_t enableSensor(Sensor const* sensor) const; 70 status_t disableSensor(Sensor const* sensor) const; 71 status_t setEventRate(Sensor const* sensor, nsecs_t ns) const; 78 // Send an ack for every wake_up sensor event that is set to WAKE_UP_SENSOR_EVENT_NEEDS_ACK.
|
/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/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...] |