/frameworks/base/core/java/android/hardware/ |
D | SystemSensorManager.java | 41 private static native int nativeGetNextSensor(Sensor sensor, int next); in nativeGetNextSensor() argument 72 Sensor sensor = new Sensor(); in SystemSensorManager() local 73 i = nativeGetNextSensor(sensor, i); in SystemSensorManager() 77 fullList.add(sensor); in SystemSensorManager() 78 sHandleToSensor.append(sensor.getHandle(), sensor); in SystemSensorManager() local 95 protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, in registerListenerImpl() argument 97 if (listener == null || sensor == null) { in registerListenerImpl() 102 if (Sensor.getReportingMode(sensor) == Sensor.REPORTING_MODE_ONE_SHOT) { in registerListenerImpl() 120 if (!queue.addSensor(sensor, delayUs, maxBatchReportLatencyUs, reservedFlags)) { in registerListenerImpl() 127 return queue.addSensor(sensor, delayUs, maxBatchReportLatencyUs, reservedFlags); in registerListenerImpl() [all …]
|
D | LegacySensorManager.java | 113 Sensor sensor = mSensorManager.getDefaultSensor(type); in registerLegacyListener() local 114 if (sensor != null) { in registerLegacyListener() 134 result = mSensorManager.registerListener(legacyListener, sensor, rate); in registerLegacyListener() 165 Sensor sensor = mSensorManager.getDefaultSensor(type); in unregisterLegacyListener() local 166 if (sensor != null) { in unregisterLegacyListener() 179 mSensorManager.unregisterListener(legacyListener, sensor); in unregisterLegacyListener() 248 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged() argument 250 mTarget.onAccuracyChanged(getLegacySensorType(sensor.getType()), accuracy); in onAccuracyChanged() 262 int type = event.sensor.getType(); in onSensorChanged() 286 private void mapSensorDataToWindow(int sensor, in mapSensorDataToWindow() argument [all …]
|
D | SensorManager.java | 537 public void unregisterListener(SensorEventListener listener, Sensor sensor) { in unregisterListener() argument 538 if (listener == null || sensor == null) { in unregisterListener() 542 unregisterListenerImpl(listener, sensor); in unregisterListener() 564 protected abstract void unregisterListenerImpl(SensorEventListener listener, Sensor sensor); in unregisterListenerImpl() argument 603 public boolean registerListener(SensorEventListener listener, Sensor sensor, int rateUs) { in registerListener() argument 604 return registerListener(listener, sensor, rateUs, null); in registerListener() 659 public boolean registerListener(SensorEventListener listener, Sensor sensor, int rateUs, in registerListener() argument 662 return registerListenerImpl(listener, sensor, delay, null, maxBatchReportLatencyUs, 0); in registerListener() 707 public boolean registerListener(SensorEventListener listener, Sensor sensor, int rateUs, in registerListener() argument 710 return registerListenerImpl(listener, sensor, delay, handler, 0, 0); in registerListener() [all …]
|
D | Sensor.java | 271 static int getReportingMode(Sensor sensor) { in getReportingMode() argument 272 int offset = sensor.mType * 2; in getReportingMode() 277 int minDelay = sensor.mMinDelay; in getReportingMode() 289 static int getMaxLengthValuesArray(Sensor sensor, int sdkLevel) { in getMaxLengthValuesArray() argument 290 int type = sensor.mType; in getMaxLengthValuesArray()
|
D | SensorListener.java | 90 public void onSensorChanged(int sensor, float[] values); in onSensorChanged() argument 100 public void onAccuracyChanged(int sensor, int accuracy); in onAccuracyChanged() argument
|
D | SensorEventListener2.java | 33 public void onFlushCompleted(Sensor sensor); in onFlushCompleted() argument
|
/frameworks/base/native/android/ |
D | sensor.cpp | 86 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor) in ASensorEventQueue_enableSensor() argument 89 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_enableSensor() 92 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor) in ASensorEventQueue_disableSensor() argument 95 static_cast<Sensor const*>(sensor)); in ASensorEventQueue_disableSensor() 98 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, in ASensorEventQueue_setEventRate() argument 102 static_cast<Sensor const*>(sensor), us2ns(usec)); in ASensorEventQueue_setEventRate() 132 const char* ASensor_getName(ASensor const* sensor) in ASensor_getName() argument 134 return static_cast<Sensor const*>(sensor)->getName().string(); in ASensor_getName() 137 const char* ASensor_getVendor(ASensor const* sensor) in ASensor_getVendor() argument 139 return static_cast<Sensor const*>(sensor)->getVendor().string(); in ASensor_getVendor() [all …]
|
/frameworks/native/services/sensorservice/ |
D | SensorService.cpp | 177 const Sensor sensor(s->getSensor()); in registerSensor() local 179 mSensorList.add(sensor); in registerSensor() 181 mSensorMap.add(sensor.getHandle(), s); in registerSensor() 183 mLastEventSeen.add(sensor.getHandle(), event); in registerSensor() 185 return sensor; in registerSensor() 190 Sensor sensor = registerSensor(s); in registerVirtualSensor() local 192 return sensor; in registerVirtualSensor() 299 SensorInterface* sensor; in cleanupAutoDisabledSensor() local 302 int handle = buffer[i].sensor; in cleanupAutoDisabledSensor() 306 sensor = mSensorMap.valueFor(handle); in cleanupAutoDisabledSensor() [all …]
|
D | RotationVectorSensor.cpp | 47 outEvent->sensor = '_rov'; in process() 74 Sensor sensor(&hwSensor); in getSensor() local 75 return sensor; in getSensor() 96 outEvent->sensor = '_gbs'; in process() 123 Sensor sensor(&hwSensor); in getSensor() local 124 return sensor; in getSensor()
|
D | SensorInterface.cpp | 33 HardwareSensor::HardwareSensor(const sensor_t& sensor) in HardwareSensor() argument 35 mSensor(&sensor, mSensorDevice.getHalDeviceVersion()) in HardwareSensor() 37 ALOGI("%s", sensor.name); in HardwareSensor()
|
D | OrientationSensor.cpp | 60 outEvent->sensor = '_ypr'; in process() 87 Sensor sensor(&hwSensor); in getSensor() local 88 return sensor; in getSensor()
|
D | LinearAccelerationSensor.cpp | 46 outEvent->sensor = '_lin'; in process() 73 Sensor sensor(&hwSensor); in getSensor() local 74 return sensor; in getSensor()
|
D | CorrectedGyroSensor.cpp | 53 outEvent->sensor = '_cgy'; in process() 80 Sensor sensor(&hwSensor); in getSensor() local 81 return sensor; in getSensor()
|
D | GravitySensor.cpp | 62 outEvent->sensor = '_grv'; in process() 88 Sensor sensor(&hwSensor); in getSensor() local 89 return sensor; in getSensor()
|
/frameworks/base/docs/html/guide/topics/sensors/ |
D | sensors_overview.jd | 10 <li>Learn about the sensors that Android supports and the Android sensor framework.</li> 11 <li>Find out how to list sensors, determine sensor capabilities, and monitor sensor data.</li> 57 game might track readings from a device's gravity sensor to infer complex user gestures 59 device's temperature sensor and humidity sensor to calculate and report the dewpoint, or a travel 60 application might use the geomagnetic field sensor and accelerometer to report a compass 83 <p>You can access sensors available on the device and acquire raw sensor data by using the Android 84 sensor framework. The sensor framework provides several classes and interfaces that help you perfor… 85 variety of sensor-related tasks. For example, you can use the sensor framework to do the following:… 89 <li>Determine an individual sensor's capabilities, such as its maximum range, manufacturer, power 91 <li>Acquire raw sensor data and define the minimum rate at which you acquire sensor data.</li> [all …]
|
D | sensors_position.jd | 44 geomagnetic field sensor and the orientation sensor. The Android platform also 45 provides a sensor that lets you determine how close the face of a device is to an object (known as 46 the proximity sensor). The geomagnetic field sensor and the proximity sensor are hardware-based. 48 handset and tablet manufacturers include a geomagnetic field sensor. Likewise, handset manufacturers 49 usually include a proximity sensor to determine when a handset is being held close to a user's face 50 (for example, during a phone call). The orientation sensor is software-based and derives its data 51 from the accelerometer and the geomagnetic field sensor.</p> 53 <p class="note"><strong>Note:</strong> The orientation sensor was deprecated in Android 2.2 (API 57 world's frame of reference. For example, you can use the geomagnetic field sensor in 59 the magnetic North Pole. You can also use the orientation sensor (or similar sensor-based [all …]
|
D | sensors_environment.jd | 40 the light sensor, which most device manufacturers use to control screen brightness, environment 42 verify at runtime whether an environment sensor exists before you attempt to acquire data from 45 <p>Unlike most motion sensors and position sensors, which return a multi-dimensional array of sensor 46 values for each {@link android.hardware.SensorEvent}, environment sensors return a single sensor 94 device. This sensor was deprecated in Android 4.0 (API Level 14).</p> 101 android.hardware.SensorManager} class, which you can use to get an instance of a physical sensor. 102 Then you register a sensor listener in the {@link android.app.Activity#onResume 103 onResume()} method, and start handling incoming sensor data in the {@link 117 // Get an instance of the sensor service, and use that to get an instance of 118 // a particular sensor. [all …]
|
D | sensors_motion.jd | 60 device position, but they can be used with other sensors, such as the geomagnetic field sensor, to 65 <p>All of the motion sensors return multi-dimensional arrays of sensor values for each {@link 66 android.hardware.SensorEvent}. For example, during a single sensor event the accelerometer returns 159 <p>The rotation vector sensor and the gravity sensor are the most frequently used sensors for motion 160 detection and monitoring. The rotational vector sensor is particularly versatile and can be used for 162 monitoring relative orientation changes. For example, the rotational vector sensor is ideal if you 165 the accelerometer and geomagnetic field sensor or the orientation sensor.</p> 170 sensor, a linear acceleration sensor, and a rotation vector sensor. These sensors were updated in 176 sensors. For example, if a device manufacturer provides their own gravity sensor, then the AOSP 177 gravity sensor shows up as a secondary gravity sensor. All three of these sensors rely on a [all …]
|
/frameworks/native/include/android/ |
D | sensor.h | 111 int32_t sensor; member 136 int32_t sensor; member 215 int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor); 220 int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor); 229 int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec); 260 const char* ASensor_getName(ASensor const* sensor); 265 const char* ASensor_getVendor(ASensor const* sensor); 270 int ASensor_getType(ASensor const* sensor); 275 float ASensor_getResolution(ASensor const* sensor); 282 int ASensor_getMinDelay(ASensor const* sensor);
|
/frameworks/base/core/jni/ |
D | android_hardware_SensorManager.cpp | 79 nativeGetNextSensor(JNIEnv *env, jclass clazz, jobject sensor, jint next) in nativeGetNextSensor() argument 92 env->SetObjectField(sensor, sensorOffsets.name, name); in nativeGetNextSensor() 93 env->SetObjectField(sensor, sensorOffsets.vendor, vendor); in nativeGetNextSensor() 94 env->SetIntField(sensor, sensorOffsets.version, list->getVersion()); in nativeGetNextSensor() 95 env->SetIntField(sensor, sensorOffsets.handle, list->getHandle()); in nativeGetNextSensor() 96 env->SetIntField(sensor, sensorOffsets.type, list->getType()); in nativeGetNextSensor() 97 env->SetFloatField(sensor, sensorOffsets.range, list->getMaxValue()); in nativeGetNextSensor() 98 env->SetFloatField(sensor, sensorOffsets.resolution, list->getResolution()); in nativeGetNextSensor() 99 env->SetFloatField(sensor, sensorOffsets.power, list->getPowerUsage()); in nativeGetNextSensor() 100 env->SetIntField(sensor, sensorOffsets.minDelay, list->getMinDelay()); in nativeGetNextSensor() [all …]
|
/frameworks/native/libs/gui/ |
D | SensorEventQueue.cpp | 121 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const { in enableSensor() 122 return mSensorEventConnection->enableDisable(sensor->getHandle(), true, 0, 0, false); in enableSensor() 125 status_t SensorEventQueue::disableSensor(Sensor const* sensor) const { in disableSensor() 126 return mSensorEventConnection->enableDisable(sensor->getHandle(), false, 0, 0, false); in disableSensor() 143 status_t SensorEventQueue::setEventRate(Sensor const* sensor, nsecs_t ns) const { in setEventRate() argument 144 return mSensorEventConnection->setEventRate(sensor->getHandle(), ns); in setEventRate()
|
/frameworks/native/include/gui/ |
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;
|
/frameworks/base/core/java/android/view/ |
D | OrientationListener.java | 93 public void onAccuracyChanged(int sensor, int accuracy) { in onAccuracyChanged() argument 96 public void onSensorChanged(int sensor, float[] values) { in onSensorChanged() argument
|
/frameworks/base/core/java/com/android/internal/app/ |
D | IBatteryStats.aidl | 31 void noteStartSensor(int uid, int sensor); in noteStartSensor() argument 35 void noteStopSensor(int uid, int sensor); in noteStopSensor() argument
|
/frameworks/rs/java/tests/Balls/src/com/example/android/rs/balls/ |
D | Balls.java | 62 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { in onSensorChanged() 70 public void onAccuracyChanged(Sensor sensor, int accuracy) { in onAccuracyChanged() argument
|