/cts/tests/tests/view/src/android/view/cts/ |
OrientationEventListenerTest.java | 21 import android.hardware.Sensor; 45 boolean hasSensor = (sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null);
|
/frameworks/base/core/java/android/webkit/ |
DeviceOrientationService.java | 20 import android.hardware.Sensor; 145 List<Sensor> sensors = getSensorManager().getSensorList(Sensor.TYPE_ACCELEROMETER); 155 List<Sensor> sensors = getSensorManager().getSensorList(Sensor.TYPE_MAGNETIC_FIELD); 197 switch (event.sensor.getType()) { 198 case Sensor.TYPE_ACCELEROMETER: 207 case Sensor.TYPE_MAGNETIC_FIELD: 222 public void onAccuracyChanged(Sensor sensor, int accuracy) [all...] |
DeviceMotionService.java | 20 import android.hardware.Sensor; 138 List<Sensor> sensors = getSensorManager().getSensorList(Sensor.TYPE_ACCELEROMETER); 160 assert(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER); 175 public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
/frameworks/rs/java/tests/Balls/src/com/example/android/rs/balls/ |
Balls.java | 41 import android.hardware.Sensor; 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) { 88 mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
|
/sdk/apps/SdkController/src/com/android/tools/sdkcontroller/handlers/ |
SensorChannel.java | 24 import android.hardware.Sensor; 46 * The target update time per sensor. Ignored if 0 or negative. 47 * Sensor updates that arrive faster than this delay are ignored. 59 /** Sensor manager. */ 67 * Sensor "enabled by emulator" state has changed. Parameter {@code obj} is 72 * Sensor display value has changed. Parameter {@code obj} is the 86 List<Sensor> sensors = mSenMan.getSensorList(Sensor.TYPE_ALL); 89 Sensor avail_sensor = sensors.get(n); 93 // The first sensor we've got for the given type is no 252 final MonitoredSensor sensor = getSensorByEFN(name); local 273 MonitoredSensor sensor = getSensorByEFN(name); local [all...] |
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowSensorManager.java | 3 import android.hardware.Sensor; 25 public boolean registerListener(SensorEventListener listener, Sensor sensor, int rate) { 37 public void unregisterListener(SensorEventListener listener, Sensor sensor) {
|
/frameworks/native/services/sensorservice/ |
LinearAccelerationSensor.cpp | 46 outEvent->sensor = '_lin'; 61 Sensor LinearAccelerationSensor::getSensor() const { 62 Sensor gsensor(mGravitySensor.getSensor()); 64 hwSensor.name = "Linear Acceleration Sensor"; 73 Sensor sensor(&hwSensor); 74 return sensor;
|
CorrectedGyroSensor.cpp | 38 mGyro = Sensor(list + i); 53 outEvent->sensor = '_cgy'; 69 Sensor CorrectedGyroSensor::getSensor() const { 71 hwSensor.name = "Corrected Gyroscope Sensor"; 80 Sensor sensor(&hwSensor); 81 return sensor;
|
GravitySensor.cpp | 38 mAccelerometer = Sensor(list + i); 55 // translates to an offset in the linear-acceleration sensor. 62 outEvent->sensor = '_grv'; 77 Sensor GravitySensor::getSensor() const { 79 hwSensor.name = "Gravity Sensor"; 88 Sensor sensor(&hwSensor); 89 return sensor;
|
RotationVectorSensor.cpp | 47 outEvent->sensor = '_rov'; 63 Sensor RotationVectorSensor::getSensor() const { 65 hwSensor.name = "Rotation Vector Sensor"; 74 Sensor sensor(&hwSensor); 75 return sensor; 96 outEvent->sensor = '_gbs'; 112 Sensor GyroDriftSensor::getSensor() const { 123 Sensor sensor(&hwSensor) [all...] |
/frameworks/base/core/java/android/view/ |
OrientationEventListener.java | 20 import android.hardware.Sensor; 38 private Sensor mSensor; 63 * @param rate at which sensor events are processed (see also 71 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 83 * Enables the OrientationEventListener so it will monitor the sensor and call 139 mOldListener.onSensorChanged(Sensor.TYPE_ACCELEROMETER, event.values); 147 public void onAccuracyChanged(Sensor sensor, int accuracy) { 153 * Returns true if sensor is enabled and false otherwise
|
/frameworks/native/libs/gui/ |
SensorManager.cpp | 31 #include <gui/Sensor.h> 93 mSensorList = (Sensor const**)malloc(count * sizeof(Sensor*)); 104 ssize_t SensorManager::getSensorList(Sensor const* const** list) const 115 Sensor const* SensorManager::getDefaultSensor(int type) 119 // For now we just return the first sensor of that type we find.
|
SensorEventQueue.cpp | 26 #include <gui/Sensor.h> 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 [all...] |
/hardware/ti/omap4xxx/camera/ |
SensorListener.cpp | 20 * This file listens and propogates sensor events to CameraHal. 49 if (sen_events[i].type == Sensor::TYPE_ACCELEROMETER) { 82 } else if (sen_events[i].type == Sensor::TYPE_GYROSCOPE) { 155 CAMHAL_LOGEA("Couldn't create sensor looper thread"); 160 ret = mSensorLooperThread->run("sensor looper thread", PRIORITY_URGENT_DISPLAY); 197 Sensor const* sensor; local 205 sensor = mgr.getDefaultSensor(Sensor::TYPE_ACCELEROMETER); 206 CAMHAL_LOGDB("orientation = %p (%s)", sensor, sensor->getName().string()) 216 Sensor const* sensor; local [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/os/ |
TriggerSensors.java | 22 import android.hardware.Sensor; 31 * <h3>Application showing the Trigger Sensor API for the Significant Motion sensor. </h3> 64 // Sensor is auto disabled. 70 private Sensor mSigMotion; 85 // The sensor is auto disabled when triggered. 100 mSigMotion = mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION);
|
Sensors.java | 23 import android.hardware.Sensor; 35 * <h3>Application that displays the values of the acceleration sensor graphically.</h3> 174 //Log.d(TAG, "sensor: " + sensor + ", x: " + values[0] + ", y: " + values[1] + ", z: " + values[2]); 179 if (event.sensor.getType() == Sensor.TYPE_ORIENTATION) { 187 int j = (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) ? 1 : 0; 195 if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD [all...] |
RotationVectorDemo.java | 25 import android.hardware.Sensor; 34 * {@link SensorEvent#values rotation vector sensor} 35 * ({@link Sensor#TYPE_ROTATION_VECTOR TYPE_ROTATION_VECTOR}). 37 * @see Sensor 83 private Sensor mRotationVectorSensor; 87 // find the rotation-vector sensor 89 Sensor.TYPE_ROTATION_VECTOR); 100 // enable our sensor when the activity is resumed, ask for 106 // make sure to turn our sensor off when the activity is paused 111 // we received a sensor event. it is a good practice to chec [all...] |
/device/generic/goldfish/camera/fake-pipeline2/ |
Sensor.h | 21 * The sensor is abstracted as operating as a pipeline 3 stages deep; 23 * processing step for the sensor is marked off by vertical sync signals, which 27 * configuration, the sensor's registers for settings such as exposure time, 29 * 2, the image data for the frame is actually captured by the sensor. Finally, 33 * The sensor is assumed to be rolling-shutter, so low-numbered rows of the 34 * sensor are exposed earlier in time than larger-numbered rows, with the time 37 * The characteristics of this sensor don't correspond to any actual sensor, 44 * C = update sensor registers for frame 87 class Sensor: private Thread, public virtual RefBase [all...] |
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
SensorManagerTest.java | 4 import android.hardware.Sensor; 45 Sensor sensor = sensorManager.getDefaultSensor(SensorManager.SENSOR_ACCELEROMETER); local 46 sensorManager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_NORMAL); 74 public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
Compass.java | 21 import android.hardware.Sensor; 34 private Sensor mSensor; 48 public void onAccuracyChanged(Sensor sensor, int accuracy) { 56 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
|
/packages/apps/Phone/src/com/android/phone/ |
AccelerometerListener.java | 20 import android.hardware.Sensor; 39 private Sensor mSensor; 44 // mPendingOrientation is the latest orientation computed based on the sensor value. 69 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 118 // If some values are exactly zero, then likely the sensor is not powered up yet. 138 public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
AccelerometerTestActivity.java | 23 import android.hardware.Sensor; 69 Sensor.TYPE_ACCELEROMETER).get(0), SensorManager.SENSOR_DELAY_UI);
|
/development/samples/Compass/src/com/example/android/compass/ |
CompassActivity.java | 30 import android.hardware.Sensor; 77 Sensor gsensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 78 Sensor msensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); 205 public void onAccuracyChanged(Sensor sensor, int accuracy) { 209 int type = event.sensor.getType(); 211 if (type == Sensor.TYPE_ACCELEROMETER) { 213 } else if (type == Sensor.TYPE_MAGNETIC_FIELD) [all...] |
/frameworks/base/core/java/android/hardware/ |
SensorManager.java | 29 * SensorManager lets you access the device's {@link android.hardware.Sensor 42 * Note: Don't use this mechanism with a Trigger Sensor, have a look 43 * at {@link TriggerEventListener}. {@link Sensor#TYPE_SIGNIFICANT_MOTION} 44 * is an example of a trigger sensor. 49 * private final Sensor mAccelerometer; 53 * mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 66 * public void onAccuracyChanged(Sensor sensor, int accuracy) { 76 * @see Sensor 86 private final SparseArray<List<Sensor>> mSensorListByType [all...] |
/frameworks/base/tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/ |
SimpleModelView.java | 24 import android.hardware.Sensor; 41 private Sensor mRotationVectorSensor; 55 // find the rotation-vector sensor 57 Sensor.TYPE_ROTATION_VECTOR); 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) {
|