/packages/apps/Dialer/java/com/android/incallui/answer/impl/classifier/ |
ProximityClassifier.java | 19 import android.hardware.Sensor; 25 * A classifier which looks at the proximity sensor during the gesture. It calculates the percentage 26 * the proximity sensor showing the near state during the whole gesture 44 if (event.sensor.getType() == Sensor.TYPE_PROXIMITY) { 45 update(event.values[0] < event.sensor.getMaximumRange(), event.timestamp); 72 * @param near is the sensor showing the near state right now
|
/packages/apps/Settings/src/com/android/settings/display/ |
LiftToWakePreferenceController.java | 17 import android.hardware.Sensor; 40 return sensors != null && sensors.getDefaultSensor(Sensor.TYPE_WAKE_GESTURE) != null;
|
/developers/build/prebuilts/gradle/BatchStepSensor/Application/src/main/java/com/example/android/batchstepsensor/ |
BatchStepSensorFragment.java | 21 import android.hardware.Sensor; 84 // List of timestamps when sensor events occurred 89 // pointer to next entry in sensor event list 94 // Value of the step counter sensor when the listener was registered. 102 // When a listener is registered, the batch sensor delay in microseconds 135 * higher and has a step counter and step detector sensor. 172 registerEventListener(BATCH_LATENCY_0, Sensor.TYPE_STEP_COUNTER); 175 registerEventListener(BATCH_LATENCY_5s, Sensor.TYPE_STEP_COUNTER); 178 registerEventListener(BATCH_LATENCY_10s, Sensor.TYPE_STEP_COUNTER); 183 registerEventListener(BATCH_LATENCY_0, Sensor.TYPE_STEP_DETECTOR) 257 Sensor sensor = sensorManager.getDefaultSensor(sensorType); local 468 String sensor = "-"; local [all...] |
/developers/samples/android/sensors/BatchStepSensor/Application/src/main/java/com/example/android/batchstepsensor/ |
BatchStepSensorFragment.java | 21 import android.hardware.Sensor; 84 // List of timestamps when sensor events occurred 89 // pointer to next entry in sensor event list 94 // Value of the step counter sensor when the listener was registered. 102 // When a listener is registered, the batch sensor delay in microseconds 135 * higher and has a step counter and step detector sensor. 172 registerEventListener(BATCH_LATENCY_0, Sensor.TYPE_STEP_COUNTER); 175 registerEventListener(BATCH_LATENCY_5s, Sensor.TYPE_STEP_COUNTER); 178 registerEventListener(BATCH_LATENCY_10s, Sensor.TYPE_STEP_COUNTER); 183 registerEventListener(BATCH_LATENCY_0, Sensor.TYPE_STEP_DETECTOR) 257 Sensor sensor = sensorManager.getDefaultSensor(sensorType); local 468 String sensor = "-"; local [all...] |
/development/samples/browseable/BatchStepSensor/src/com.example.android.batchstepsensor/ |
BatchStepSensorFragment.java | 21 import android.hardware.Sensor; 84 // List of timestamps when sensor events occurred 89 // pointer to next entry in sensor event list 94 // Value of the step counter sensor when the listener was registered. 102 // When a listener is registered, the batch sensor delay in microseconds 135 * higher and has a step counter and step detector sensor. 172 registerEventListener(BATCH_LATENCY_0, Sensor.TYPE_STEP_COUNTER); 175 registerEventListener(BATCH_LATENCY_5s, Sensor.TYPE_STEP_COUNTER); 178 registerEventListener(BATCH_LATENCY_10s, Sensor.TYPE_STEP_COUNTER); 183 registerEventListener(BATCH_LATENCY_0, Sensor.TYPE_STEP_DETECTOR) 257 Sensor sensor = sensorManager.getDefaultSensor(sensorType); local 468 String sensor = "-"; local [all...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/ |
DozeSensors.java | 25 import android.hardware.Sensor; 87 mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION), 93 mSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE), 119 private Sensor findSensorWithType(String type) { 123 static Sensor findSensorWithType(SensorManager sensorManager, String type) { 127 List<Sensor> sensorList = sensorManager.getSensorList(Sensor.TYPE_ALL); 128 for (Sensor s : sensorList) { 150 for (TriggerSensor sensor : mSensors) { 151 if (sensor.mRequiresTouchscreen) [all...] |
DozeScreenBrightness.java | 20 import android.hardware.Sensor; 38 private final Sensor mLightSensor; 48 SensorManager sensorManager, Sensor lightSensor, DozeHost host, 65 SensorManager sensorManager, Sensor lightSensor, DozeHost host, 120 // sensor reports a new brightness. This ensures that when the screen comes on 121 // again, it will only show after the brightness sensor has stabilized, 149 public void onAccuracyChanged(Sensor sensor, int accuracy) { 159 // Wait until we get an event from the sensor until indicating ready. 167 // Sensor is not enabled, hence we use the default brightness and are always ready [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/os/ |
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...] |
/frameworks/native/libs/sensor/ |
SensorEventQueue.cpp | 19 #include <sensor/SensorEventQueue.h> 27 #include <sensor/Sensor.h> 28 #include <sensor/BitTube.h> 29 #include <sensor/ISensorEventConnection.h> 31 #include <android/sensor.h> 124 status_t SensorEventQueue::enableSensor(Sensor const* sensor) const { 125 return enableSensor(sensor, SENSOR_DELAY_NORMAL); 128 status_t SensorEventQueue::enableSensor(Sensor const* sensor, int32_t samplingPeriodUs) const [all...] |
ISensorServer.cpp | 17 #include <sensor/ISensorServer.h> 32 #include <sensor/Sensor.h> 33 #include <sensor/ISensorEventConnection.h> 57 virtual Vector<Sensor> getSensorList(const String16& opPackageName) 63 Sensor s; 64 Vector<Sensor> v; 75 virtual Vector<Sensor> getDynamicSensorList(const String16& opPackageName) 81 Sensor s; 82 Vector<Sensor> v [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
OffBodySensorTestActivity.java | 24 import android.hardware.Sensor; 47 * Manual test for testing the low-latency offbody detect sensor. This test consists of 3 48 * sub-tests designed to verify the sensor event data, verify event trigger response times 49 * are within spec for the sensor type, and to verify that the sensor can wake the device. 74 // 45 secs if LLOB sensor does not trigger, the test will fail. 84 private Sensor mOffBodySensor; 109 public void onAccuracyChanged(Sensor sensor, int accuracy) {} 114 int type = event.sensor.getType() [all...] |
GyroscopeMeasurementTestActivity.java | 23 import android.hardware.Sensor; 119 Sensor.TYPE_GYROSCOPE, 123 Sensor.TYPE_GYROSCOPE_UNCALIBRATED, 141 * The test takes a set of samples from the sensor under test and calculates the angular 142 * position for each axis that the sensor data collects. It then compares it against the test 157 Sensor.TYPE_GYROSCOPE,
|
StepCounterTestActivity.java | 25 import android.hardware.Sensor; 61 private Sensor mSensorStepCounter; 62 private Sensor mSensorStepDetector; 80 mSensorStepCounter = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); 81 mSensorStepDetector = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); 207 // sensor not supported, so no-op 215 String sensorName = counterEvent.sensor.getName(); 243 + TestSensorEnvironment.getSensorMaxDetectionLatencyNs(counterEvent.sensor); 248 counterEvent.sensor.getName()); 272 counterEvent.sensor.getName()) [all...] |
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/ |
SensorManagerFacade.java | 20 import android.hardware.Sensor; 43 * sensor readings have up to 16 decimal places, the majority of which are noise. On many phones the 48 * Following a startSensingTimed(A,B) api call sensor events are entered into the Event Queue (see 51 * duplicate readings the minimum delay should be 20 milliseconds. The light sensor will probably be 53 * level is constant no sensor events will be registered by the light sensor. 55 * Following a startSensingThreshold(A,B,C) api call sensor events greater than a given threshold 60 * C parameter is the required axis (XYZ) of the sensor: 0 = No axis, 1 = X, 2 = Y, 3 = X+Y, 4 = Z, 136 @Rpc(description = "Starts recording sensor data to be available for polling.") 152 for (Sensor sensor : mSensorManager.getSensorList(Sensor.TYPE_ALL)) [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/renderers/ |
GLArrowSensorTestRenderer.java | 24 import android.hardware.Sensor; 39 * Renders a wedge to indicate the direction of sensor data. 89 if (mSensorType == Sensor.TYPE_ACCELEROMETER) { 157 public void onAccuracyChanged(Sensor arg0, int arg1) { 166 int type = event.sensor.getType(); 167 if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { 183 } else if (type == Sensor.TYPE_ROTATION_VECTOR 184 || type == Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR 185 || type == Sensor.TYPE_GAME_ROTATION_VECTOR) [all...] |
/device/generic/goldfish/camera/fake-pipeline2/ |
Sensor.h | 23 * The sensor is abstracted as operating as a pipeline 3 stages deep; 25 * processing step for the sensor is marked off by vertical sync signals, which 29 * configuration, the sensor's registers for settings such as exposure time, 31 * 2, the image data for the frame is actually captured by the sensor. Finally, 35 * The sensor is assumed to be rolling-shutter, so low-numbered rows of the 36 * sensor are exposed earlier in time than larger-numbered rows, with the time 39 * The characteristics of this sensor don't correspond to any actual sensor, 46 * C = update sensor registers for frame 89 class Sensor: private Thread, public virtual RefBase [all...] |
/packages/apps/Settings/src/com/android/settings/gestures/ |
DoubleTwistPreferenceController.java | 22 import android.hardware.Sensor; 60 for (Sensor s : sensorManager.getSensorList(Sensor.TYPE_ALL)) {
|
/cts/tests/app/src/android/app/cts/ |
SystemFeaturesTest.java | 33 import android.hardware.Sensor; 304 * Check that the sensor features reported by the PackageManager correspond to the sensors 311 Sensor.TYPE_ACCELEROMETER); 313 Sensor.TYPE_PRESSURE); 315 Sensor.TYPE_MAGNETIC_FIELD); 317 Sensor.TYPE_GYROSCOPE); 319 Sensor.TYPE_LIGHT); 321 Sensor.TYPE_PROXIMITY); 323 Sensor.TYPE_STEP_COUNTER); 325 Sensor.TYPE_STEP_DETECTOR) [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/widget/ |
WidgetTestActivity.java | 25 import android.hardware.Sensor;
|
/cts/tools/cts-device-info/src/com/android/cts/deviceinfo/ |
SensorDeviceInfo.java | 19 import android.hardware.Sensor; 33 * Sensor device info collector. 37 private static final String SENSOR = "sensor"; 69 List<Sensor> sensors = sensorManager.getSensorList(Sensor.TYPE_ALL); 70 store.startArray(SENSOR); 71 for (Sensor sensor : sensors) { 73 store.addResult(REPORTING_MODE, sensor.getReportingMode()) [all...] |
/development/samples/ApiDemos/src/com/example/android/apis/graphics/ |
SensorTest.java | 21 import android.hardware.Sensor; 33 private Sensor mSensor; 99 Log.e(TAG, "sensorChanged " + event.sensor.getName() + 133 public void onAccuracyChanged(Sensor sensor, int accuracy) { 141 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
|
/frameworks/base/services/core/java/com/android/server/ |
SensorNotificationService.java | 24 import android.hardware.Sensor; 51 "sensor.notification.use_mocked"; // max key length is 32 58 private Sensor mMetaSensor; 75 mMetaSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_DYNAMIC_SENSOR_META); 77 if (DBG) Slog.d(TAG, "Cannot obtain dynamic meta sensor, not supported."); 104 if (DBG) Slog.d(TAG, "dynamic sensor broadcast sent"); 109 if (event.sensor == mMetaSensor) { 161 public void onAccuracyChanged(Sensor sensor, int accuracy) {}
|
/frameworks/native/services/sensorservice/ |
RotationVectorSensor.h | 23 #include <sensor/Sensor.h>
|
/system/chre/platform/shared/ |
platform_sensor_util.cc | 22 #include "chre/core/sensor.h" 34 LOGE("%" PRIu16 " samples in an event for on-change sensor %" PRIu8, 51 Sensor *sensor = EventLoopManagerSingleton::get() 54 // Mark last event as valid only if the sensor is enabled. Event data 55 // may arrive after sensor is disabled. 56 if (sensor != nullptr 57 && sensor->getRequest().getMode() != SensorMode::Off) { 58 sensor->setLastEvent(cbData->event);
|
/packages/services/Car/car-support-lib/src/android/support/car/hardware/ |
CarSensorsProxy.java | 21 import android.hardware.Sensor; 52 private final Sensor mAccelerometerSensor; 53 private final Sensor mMagneticFieldSensor; 54 private final Sensor mGyroscopeSensor; 126 int type = event.sensor.getType(); 129 case Sensor.TYPE_GYROSCOPE: 134 case Sensor.TYPE_MAGNETIC_FIELD: 139 case Sensor.TYPE_ACCELEROMETER: 146 Log.w(TAG, "Unexpected sensor event type: " + type); 154 public void onAccuracyChanged(Sensor sensor, int accuracy) { [all...] |