/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...] |
SensorManager.cpp | 19 #include <sensor/SensorManager.h> 32 #include <sensor/ISensorServer.h> 33 #include <sensor/ISensorEventConnection.h> 34 #include <sensor/Sensor.h> 35 #include <sensor/SensorEventQueue.h> 80 // If we had no package name, we looked it up from the UID and the sensor 87 // Stash the per package sensor manager. 165 static_cast<Sensor const**>(malloc(count * sizeof(Sensor*))); [all...] |
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/ |
DoubleTwistPreferenceControllerTest.java | 20 import android.hardware.Sensor; 70 final List<Sensor> sensorList = new ArrayList<>(); 71 sensorList.add(mock(Sensor.class)); 89 final List<Sensor> sensorList = new ArrayList<>(); 90 sensorList.add(mock(Sensor.class));
|
/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...] |
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/ |
FalsingManager.java | 21 import android.hardware.Sensor; 43 * When the phone is locked, listens to touch, sensor and phone events and sends them to 52 Sensor.TYPE_PROXIMITY, 56 Sensor.TYPE_ACCELEROMETER, 57 Sensor.TYPE_GYROSCOPE, 58 Sensor.TYPE_PROXIMITY, 59 Sensor.TYPE_LIGHT, 60 Sensor.TYPE_ROTATION_VECTOR, 174 Sensor s = mSensorManager.getDefaultSensor(sensorType); 253 public void onAccuracyChanged(Sensor sensor, int accuracy) [all...] |
/packages/apps/Settings/src/com/android/settings/gestures/ |
DoubleTwistPreferenceController.java | 22 import android.hardware.Sensor; 62 for (Sensor s : sensorManager.getSensorList(Sensor.TYPE_ALL)) {
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/widget/ |
WidgetTestActivity.java | 23 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>
|
/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...] |
/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/ |
FrequencyVerificationTest.java | 19 import android.hardware.Sensor; 76 return new TestSensorEnvironment(getContext(), Sensor.TYPE_ALL, rateUs);
|
/frameworks/native/services/sensorservice/hidl/ |
utils.cpp | 27 using ::android::Sensor; 31 SensorInfo convertSensor(const Sensor& src) { 41 // maxRange uses maxValue because ::android::Sensor wraps the
|
/hardware/libhardware/modules/sensors/dynamic_sensor/ |
HidRawSensorDevice.cpp | 32 using namespace Hid::Sensor::SensorTypeUsage; 33 using namespace Hid::Sensor::PropertyUsage;
|
/external/androidplot/Examples/DemoApp/src/com/androidplot/demos/ |
OrientationSensorExampleActivity.java | 22 import android.hardware.Sensor;
37 // Monitor the phone's orientation sensor and plot the resulting azimuth pitch and roll values.
44 private Sensor orSensor = null;
168 // register for orientation sensor events:
170 for (Sensor sensor : sensorMgr.getSensorList(Sensor.TYPE_ORIENTATION)) {
171 if (sensor.getType() == Sensor.TYPE_ORIENTATION) {
172 orSensor = sensor;
[all...] |