/cts/tests/sensor/src/android/hardware/cts/ |
D | SensorTest.java | 68 private SensorManager mSensorManager; field in SensorTest 82 mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); in setUp() 86 mSensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL); in setUp() 106 if (mSensorManager != null) { in tearDown() 108 mSensorManager.unregisterListener(mNullSensorEventListener); in tearDown() 110 mSensorManager.cancelTriggerSensor(mNullTriggerEventListener, mTriggerSensor); in tearDown() 129 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testSensorOperations() 140 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); in testSensorOperations() 151 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); in testSensorOperations() 162 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); in testSensorOperations() [all …]
|
D | SensorAdditionalInfoTest.java | 43 private SensorManager mSensorManager; field in SensorAdditionalInfoTest 47 mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); in setUp() 51 if (mSensorManager == null) { in testSensorAdditionalInfo() 55 List<Sensor> list = mSensorManager.getSensorList(Sensor.TYPE_ALL); in testSensorAdditionalInfo() 100 mSensorManager.registerListener(verifier, s, SensorManager.SENSOR_DELAY_NORMAL)); in runSensorAdditionalInfoTest() 149 assertTrue("Flush sensor failed.", mSensorManager.flush(verifier)); in runSensorAdditionalInfoTest() 153 mSensorManager.unregisterListener(verifier); in runSensorAdditionalInfoTest()
|
D | SensorBatchingFifoTest.java | 41 private SensorManager mSensorManager; field in SensorBatchingFifoTest 45 mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); in setUp() 80 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in getReservedFifoLength() 89 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in runBatchingSensorFifoTest()
|
D | SensorParameterRangeTest.java | 80 private SensorManager mSensorManager; field in SensorParameterRangeTest 85 mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); in setUp() 149 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkSensorRangeAndFrequency() 210 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkMinFifoLength() 220 List<Sensor> sensors = mSensorManager.getSensorList(Sensor.TYPE_ALL); in testStaticSensorId()
|
D | SensorSupportTest.java | 43 private SensorManager mSensorManager; field in SensorSupportTest 57 mSensorManager = in setUp() 131 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkSupportsSensor()
|
D | SensorDirectReportTest.java | 154 private SensorManager mSensorManager; field in SensorDirectReportTest 173 mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); in setUp() 490 Sensor s = mSensorManager.getDefaultSensor(type); in testCloseWithoutConfigStop() 610 Sensor s = mSensorManager.getDefaultSensor(sensorType); in runSensorDirectReportTest() 642 Sensor s1 = mSensorManager.getDefaultSensor(type1); in runSingleChannelRateIndependencyTest() 643 Sensor s2 = mSensorManager.getDefaultSensor(type2); in runSingleChannelRateIndependencyTest() 694 Sensor s = mSensorManager.getDefaultSensor(type); in runMultiChannelRateIndependencyTest() 751 final Sensor s = mSensorManager.getDefaultSensor(type); in runMultiModeRateIndependencyTest() 774 boolean registerRet = mSensorManager.registerListener(listener, s, samplingPeriodUs); in runMultiModeRateIndependencyTest() 780 mSensorManager.unregisterListener(listener); in runMultiModeRateIndependencyTest() [all …]
|
D | SensorNativeTest.java | 30 private SensorManager mSensorManager; field in SensorNativeTest
|
/cts/tests/sensor/src/android/hardware/cts/helpers/ |
D | MovementDetectorHelper.java | 43 private final SensorManager mSensorManager; field in MovementDetectorHelper 49 mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); in MovementDetectorHelper() 50 Assert.assertNotNull("SensorManager", mSensorManager); in MovementDetectorHelper() 52 mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in MovementDetectorHelper() 63 mInitialized = mSensorManager in start() 73 mSensorManager.unregisterListener(this); in stop()
|
D | TestSensorManager.java | 40 private final SensorManager mSensorManager; field in TestSensorManager 61 mSensorManager = in TestSensorManager() 81 boolean result = mSensorManager.registerListener( in registerListener() 113 result = mSensorManager.registerListener( in registerListener() 120 result = mSensorManager.registerListener( in registerListener() 152 mSensorManager.unregisterListener(mTestSensorEventListener, mEnvironment.getSensor()); in unregisterListener() 173 mSensorManager.flush(mTestSensorEventListener)); in requestFlush()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | StepSensorPermissionTestActivity.java | 52 private SensorManager mSensorManager; field in StepSensorPermissionTestActivity 67 mSensorManager = (SensorManager) getApplicationContext() in activitySetUp() 77 mAccelRecorder = new AccelRecorder(mSensorManager); in activitySetUp() 82 mSensorManager.unregisterListener(this); in activityCleanUp() 171 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkSensor() 176 assertTrue(msg, mSensorManager.registerListener(this, sensor, 0, 0) == expected); in checkSensor() 208 private SensorManager mSensorManager; field in StepSensorPermissionTestActivity.AccelRecorder 213 mSensorManager = sensorManager; in AccelRecorder() 214 mAccel = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in AccelRecorder() 219 mSensorManager.registerListener( in start() [all …]
|
D | SensorSynchronizationTestActivity.java | 39 private SensorManager mSensorManager = null; field in SensorSynchronizationTestActivity 45 mSensorManager = (SensorManager) getApplicationContext() in startDataCollection() 47 mSensorManager.registerListener(this, in startDataCollection() 48 mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), in startDataCollection() 50 mSensorManager.registerListener(this, in startDataCollection() 51 mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), in startDataCollection() 53 mSensorManager.registerListener(this, in startDataCollection() 54 mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE), in startDataCollection() 59 mSensorManager.unregisterListener(this); in stopDataCollection()
|
D | DynamicSensorDiscoveryTestActivity.java | 46 private SensorManager mSensorManager; field in DynamicSensorDiscoveryTestActivity 59 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in activitySetUp() 60 if (mSensorManager == null || !(Build.VERSION.SDK_INT > Build.VERSION_CODES.M || in activitySetUp() 64 mFeatureSupported = mSensorManager.isDynamicSensorDiscoverySupported(); in activitySetUp() 81 mSensorManager.registerDynamicSensorCallback(mCallback); in activitySetUp() 230 if (!mSensorManager.registerListener( in waitForSensorEvent() 242 mSensorManager.unregisterListener(eventCallback); in waitForSensorEvent() 251 mSensorManager.getDynamicSensorList(Sensor.TYPE_ALL).contains(mSensor); in isSensorInList() 258 mSensorManager.getDynamicSensorList(mSensor.getType()).contains(mSensor); in isSensorInListOfSpecificType() 277 List<Sensor> dynamicSensors = mSensorManager.getDynamicSensorList(Sensor.TYPE_ALL); in isDynamicFlagSetCorrectly() [all …]
|
D | AccelerometerTestActivity.java | 41 private SensorManager mSensorManager; field in AccelerometerTestActivity 49 mSensorManager = (SensorManager) getApplicationContext().getSystemService( in onCreate() 65 mSensorManager.unregisterListener(mListener); in onPause() 73 mSensorManager.registerListener(mListener, mSensorManager.getSensorList( in onResume()
|
D | RotationVectorTestActivity.java | 52 private SensorManager mSensorManager; field in RotationVectorTestActivity 166 mSensorManager = (SensorManager) getApplicationContext().getSystemService( in onCreate() 169 mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); in onCreate() 171 mSensorManager.getDefaultSensor(Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR); in onCreate() 173 mSensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR); in onCreate() 187 mSensorManager.unregisterListener(mListener); in onPause() 188 mSensorManager.unregisterListener(this); in onPause() 200 renderListenerRegistered = mSensorManager in onResume() 208 mSensorManager.registerListener(this, mSensor[i], SensorManager.SENSOR_DELAY_GAME); in onResume()
|
D | HeartRateMonitorTestActivity.java | 37 private SensorManager mSensorManager; field in HeartRateMonitorTestActivity 52 mSensorManager = (SensorManager) getApplicationContext().getSystemService( in onCreate() 54 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE); in onCreate() 61 if (!mSensorManager.registerListener(mSensorListener, mSensor, in onResume() 71 mSensorManager.unregisterListener(mSensorListener, mSensor); in onPause()
|
D | DeviceSuspendTestActivity.java | 66 private SensorManager mSensorManager; field in DeviceSuspendTestActivity 70 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in activitySetUp() 172 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER, true); in testAPWakeUpWhenReportLatencyExpiresAccel() 180 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE, true); in testAPWakeUpWhenReportLatencyExpiresGyro() 188 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD,true); in testAPWakeUpWhenReportLatencyExpiresMag() 196 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER, true); in testAPWakeUpWhenFIFOFullAccel() 204 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE, true); in testAPWakeUpWhenFIFOFullGyro() 212 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD,true); in testAPWakeUpWhenFIFOFullMag() 220 Sensor accel = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testAccelBatchingInAPSuspendLargeReportLatency() 228 Sensor accel = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testAccelBatchingInAPSuspendZeroReportLatency() [all …]
|
D | RVCVRecordActivity.java | 760 SensorManager mSensorManager; field in RVCVRecordActivity.RawSensorLogger 774 mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); in init() 776 mAccSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in init() 777 mGyroSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE_UNCALIBRATED); in init() 778 mMagSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED); in init() 780 mSensorManager.registerListener(this, mAccSensor, SENSOR_RATE); in init() 781 mSensorManager.registerListener(this, mGyroSensor, SENSOR_RATE); in init() 782 mSensorManager.registerListener(this, mMagSensor, SENSOR_RATE); in init() 801 mSensorManager.flush(this); in end() 802 mSensorManager.unregisterListener(this); in end() [all …]
|
D | StepCounterTestActivity.java | 60 private SensorManager mSensorManager; field in StepCounterTestActivity 79 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in activitySetUp() 80 mSensorStepCounter = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); in activitySetUp() 81 mSensorStepDetector = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); in activitySetUp() 164 mSensorManager.registerListener(this, mSensorStepCounter, in startMeasurements() 169 mSensorManager.registerListener(this, mSensorStepDetector, in startMeasurements() 183 mSensorManager.unregisterListener(this); in verifyMeasurements()
|
D | SignificantMotionTestActivity.java | 81 private SensorManager mSensorManager; field in SignificantMotionTestActivity 151 mSensorManager.requestTriggerSensor(verifier, mSensorSignificantMotion); in testTriggerDeactivation() 201 mSensorManager.requestTriggerSensor(mVerifier, mSensorSignificantMotion); in testAPWakeUpOnSMDTrigger() 261 boolean success = mSensorManager.requestTriggerSensor(verifier, mSensorSignificantMotion); 268 mSensorManager.cancelTriggerSensor(verifier, mSensorSignificantMotion)); 282 mSensorManager.cancelTriggerSensor(verifier, mSensorSignificantMotion); 294 mSensorManager = (SensorManager) getApplicationContext() 296 mSensorSignificantMotion = mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION);
|
D | GyroscopeTestActivity.java | 48 private SensorManager mSensorManager; field in GyroscopeTestActivity 75 mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); in onCreate() 76 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); in onCreate() 150 if (!mSensorManager.registerListener(mSensorListener, mSensor, in onResume() 159 mSensorManager.unregisterListener(mSensorListener, mSensor); in onPause()
|
D | OffBodySensorTestActivity.java | 83 private SensorManager mSensorManager; field in OffBodySensorTestActivity 291 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in activitySetUp() 292 mOffBodySensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LOW_LATENCY_OFFBODY_DETECT, in activitySetUp() 322 mSensorManager.unregisterListener(verifier); in stopOffbodySensorListener() 329 if (!mSensorManager.registerListener(verifier, mOffBodySensor, in startOffbodySensorListener() 361 Sensor wakeUpSensor = mSensorManager.getDefaultSensor( in testOffbodyDetectResponseTime() 370 Sensor wakeUpSensor = mSensorManager.getDefaultSensor( in testOnbodyDetectResponseTime() 379 Sensor wakeUpSensor = mSensorManager.getDefaultSensor( in testWakeAPOffbodyDetect()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Utils/PoseProvider/ |
D | AndroidPoseProvider.java | 29 private SensorManager mSensorManager; field in AndroidPoseProvider 54 mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE); in onStartPoseProviding() 56 m6DoFSensor = mSensorManager.getDefaultSensor(SENSOR_TYPE_POSE); in onStartPoseProviding() 57 … mSensorManager.registerListener(mSensorListener, m6DoFSensor, SensorManager.SENSOR_DELAY_FASTEST); in onStartPoseProviding() 62 mSensorManager.unregisterListener(mSensorListener); in onStopPoseProviding()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/ |
D | PowerTestHostLink.java | 81 private final SensorManager mSensorManager; field in PowerTestHostLink 88 mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); in PowerTestHostLink() 214 if (mSensorManager.getDefaultSensor(sensorId) == null) { in processClientRequest() 398 mSensorManager.registerListener(mSensorEventListener, in switchSensor() 399 mSensorManager.getDefaultSensor(sensorId), rateUs); in switchSensor() 403 mSensorManager.unregisterListener(mSensorEventListener, in switchSensor() 404 mSensorManager.getDefaultSensor(sensorId)); in switchSensor() 413 List<Sensor> allSensors = mSensorManager.getSensorList(Sensor.TYPE_ALL); in switchAllSensors()
|
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/ |
D | TestSensorOperation.java | 65 private final TestSensorManager mSensorManager; field in TestSensorOperation 99 mSensorManager = new TestSensorManager(mEnvironment); in TestSensorOperation() 135 mExecutor.execute(mSensorManager, listener); in execute() 144 mExecutor.execute(mSensorManager, listener); in execute()
|
/cts/tests/app/src/android/app/cts/ |
D | SystemFeaturesTest.java | 80 private SensorManager mSensorManager; field in SystemFeaturesTest 98 mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE); in setUp() 470 List<Sensor> sensors = mSensorManager.getSensorList(expectedSensorType); in assertFeatureForSensor()
|