/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/tests/sensor/src/android/hardware/cts/helpers/ |
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() 169 mSensorManager.flush(mTestSensorEventListener)); in assertFlushFail() 187 mSensorManager.flush(mTestSensorEventListener)); in requestFlush()
|
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 | SensorRatePermissionDirectReportTestHelper.java | 63 private final SensorManager mSensorManager; field in SensorRatePermissionDirectReportTestHelper 68 mSensorManager = context.getSystemService(SensorManager.class); in SensorRatePermissionDirectReportTestHelper() 70 for (Sensor sensor : mSensorManager.getSensorList(sensorType)) { in SensorRatePermissionDirectReportTestHelper() 164 SensorDirectChannel channel = mSensorManager.createDirectChannel(hardwareBuffer); in getSensorEvents()
|
/cts/tests/sensor/src/android/hardware/cts/ |
D | SensorTest.java | 69 private SensorManager mSensorManager; field in SensorTest 83 mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); in setUp() 87 mSensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL); in setUp() 108 if (mSensorManager != null) { in tearDown() 110 mSensorManager.unregisterListener(mNullSensorEventListener); in tearDown() 112 mSensorManager.cancelTriggerSensor(mNullTriggerEventListener, mTriggerSensor); in tearDown() 135 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testSensorOperations_accelerometer() 149 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER); in testSensorOperations_stepCounter() 163 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR); in testSensorOperations_stepDetector() 177 Sensor sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); in testSensorOperations_magneticField() [all …]
|
D | SensorHeadTrackerTest.java | 49 private SensorManager mSensorManager; field in SensorHeadTrackerTest 68 mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); in setUp() 78 mSensorManager.registerDynamicSensorCallback(mCallback, mVirtualHeadTracker.handler); in setUp() 100 if (!mHasSensorDynamicHeadTracker && mSensorManager.isDynamicSensorDiscoverySupported()) { in testIsNotDynamicSensorDiscoverySupported() 116 mSensorManager.isDynamicSensorDiscoverySupported()); in testIsDynamicSensorDiscoverySupported() 238 mSensorManager.registerDynamicSensorCallback(secondCallback, virtualHeadTrackerTwo.handler); in testAddSecondSensor() 339 mSensorManager.registerListener( in waitForFlush() 342 mSensorManager.flush(eventCallback); in waitForFlush() 351 mSensorManager.unregisterListener(eventCallback); in waitForFlush() 376 mSensorManager.registerListener( in getOneSensorEvent() [all …]
|
D | SensorSupportTest.java | 43 private SensorManager mSensorManager; field in SensorSupportTest 59 mSensorManager = in setUp() 163 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkHifiVrSensorSupport() 172 return (mSensorManager != null && mSensorManager.getDefaultSensor(sensorType) != null); in hasSensorType()
|
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 | SensorAdditionalInfoTest.java | 41 private SensorManager mSensorManager; field in SensorAdditionalInfoTest 45 mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); in setUp() 49 if (mSensorManager == null) { in testSensorAdditionalInfo() 53 List<Sensor> list = mSensorManager.getSensorList(Sensor.TYPE_ALL); in testSensorAdditionalInfo() 97 mSensorManager.registerListener(verifier, s, SensorManager.SENSOR_DELAY_NORMAL)); in runSensorAdditionalInfoTest() 136 assertTrue("Flush sensor failed.", mSensorManager.flush(verifier)); in runSensorAdditionalInfoTest() 140 mSensorManager.unregisterListener(verifier); in runSensorAdditionalInfoTest()
|
D | SensorParameterRangeTest.java | 86 private SensorManager mSensorManager; field in SensorParameterRangeTest 91 mSensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE); in setUp() 173 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkSensorRangeAndFrequency() 233 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in checkMinFifoLength() 243 List<Sensor> sensors = mSensorManager.getSensorList(Sensor.TYPE_ALL); in testStaticSensorId()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
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 | 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 | 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 | DynamicSensorDiscoveryTestActivity.java | 47 private SensorManager mSensorManager; field in DynamicSensorDiscoveryTestActivity 61 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in activitySetUp() 62 if (mSensorManager == null || !(Build.VERSION.SDK_INT > Build.VERSION_CODES.M || in activitySetUp() 66 mFeatureSupported = mSensorManager.isDynamicSensorDiscoverySupported(); in activitySetUp() 87 mSensorManager.registerDynamicSensorCallback(mCallback); in activitySetUp() 241 if (!mSensorManager.registerListener( in waitForSensorEvent() 253 mSensorManager.unregisterListener(eventCallback); in waitForSensorEvent() 262 mSensorManager.getDynamicSensorList(Sensor.TYPE_ALL).contains(mSensor); in isSensorInList() 269 mSensorManager.getDynamicSensorList(mSensor.getType()).contains(mSensor); in isSensorInListOfSpecificType() 288 List<Sensor> dynamicSensors = mSensorManager.getDynamicSensorList(Sensor.TYPE_ALL); in isDynamicFlagSetCorrectly() [all …]
|
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 | HingeAngleTestActivity.java | 30 private SensorManager mSensorManager; field in HingeAngleTestActivity 38 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in activitySetUp() 55 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_HINGE_ANGLE); in verifyMeasurements()
|
D | DeviceSuspendTestActivity.java | 46 private SensorManager mSensorManager; field in DeviceSuspendTestActivity 51 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in activitySetUp() 152 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER, true); in testAPWakeUpWhenReportLatencyExpiresAccel() 160 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE, true); in testAPWakeUpWhenReportLatencyExpiresGyro() 168 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD,true); in testAPWakeUpWhenReportLatencyExpiresMag() 176 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER, true); in testAPWakeUpWhenFIFOFullAccel() 184 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE, true); in testAPWakeUpWhenFIFOFullGyro() 192 Sensor wakeUpSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD,true); in testAPWakeUpWhenFIFOFullMag() 200 Sensor accel = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testAccelBatchingInAPSuspendLargeReportLatency() 208 Sensor accel = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in testAccelBatchingInAPSuspendZeroReportLatency() [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 | RVCVRecordActivity.java | 774 SensorManager mSensorManager; field in RVCVRecordActivity.RawSensorLogger 788 mSensorManager = (SensorManager)getSystemService(SENSOR_SERVICE); in init() 790 mAccSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in init() 791 mGyroSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE_UNCALIBRATED); in init() 792 mMagSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED); in init() 794 mSensorManager.registerListener(this, mAccSensor, SENSOR_RATE); in init() 795 mSensorManager.registerListener(this, mGyroSensor, SENSOR_RATE); in init() 796 mSensorManager.registerListener(this, mMagSensor, SENSOR_RATE); in init() 815 mSensorManager.flush(this); in end() 816 mSensorManager.unregisterListener(this); in end() [all …]
|
D | SignificantMotionTestActivity.java | 82 private SensorManager mSensorManager; field in SignificantMotionTestActivity 154 mSensorManager.requestTriggerSensor(verifier, mSensorSignificantMotion); in testTriggerDeactivation() 202 mSensorManager.requestTriggerSensor(mVerifier, mSensorSignificantMotion); in testAPWakeUpOnSMDTrigger() 259 boolean success = mSensorManager.requestTriggerSensor(verifier, mSensorSignificantMotion); 266 mSensorManager.cancelTriggerSensor(verifier, mSensorSignificantMotion)); 280 mSensorManager.cancelTriggerSensor(verifier, mSensorSignificantMotion); 292 mSensorManager = (SensorManager) getApplicationContext() 294 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()
|
/cts/tests/sensor/sensorratepermission/DebuggableAPI31/src/android/sensorratepermission/cts/debuggableapi31/ |
D | DebuggableAPI31Test.java | 48 private static SensorManager mSensorManager; field in DebuggableAPI31Test 65 mSensorManager = mContext.getSystemService(SensorManager.class); in setUp() 71 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in testRegisterListener() 81 boolean res = mSensorManager.registerListener( in testRegisterListener() 95 Sensor s = mSensorManager.getDefaultSensor(sensorType); in testDirectChannel() 108 SensorDirectChannel channel = mSensorManager.createDirectChannel(hardwareBuffer); in testDirectChannel()
|
/cts/tests/sensor/sensorratepermission/ReturnedRateInfo/src/android/sensorratepermission/cts/returnedrateinfo/ |
D | ReturnedRateInfoTest.java | 44 private static SensorManager mSensorManager; field in ReturnedRateInfoTest 60 mSensorManager = context.getSystemService(SensorManager.class); in setUp() 68 Sensor s = mSensorManager.getDefaultSensor(sensorType); in testGetMinDelayMethod() 83 List<Sensor> allSensorList = mSensorManager.getSensorList(sensorType); in testGetSensorListMethod() 95 Sensor s = mSensorManager.getDefaultSensor(sensorType); in testGetHighestDirectReportRateLevelMethod()
|
/cts/tests/tests/view/src/android/view/cts/input/ |
D | InputDeviceSensorManagerTest.java | 111 private SensorManager mSensorManager; field in InputDeviceSensorManagerTest 313 assertTrue(mSensorManager.registerListener(listeners[i], sensors[i], in testSensorManagerListenerForSensors() 361 mSensorManager.unregisterListener(listeners[i]); in testSensorManagerListenerForSensors() 366 Sensor sensor = mSensorManager.getDefaultSensor(sensorType); in getDefaultSensor() 380 mSensorManager = getSensorManager(mUinputDevice.getVendorId(), in setup() 382 assertNotNull(mSensorManager); in setup() 466 List<Sensor> sensors = mSensorManager.getSensorList(types.get(i)); in testSupportedSensorTypes() 478 List<Sensor> sensors = mSensorManager.getSensorList(type); in testUnsupportedSensorTypes() 480 assertNull(mSensorManager.getDefaultSensor(type)); in testUnsupportedSensorTypes() 490 SensorDirectChannel channel = mSensorManager.createDirectChannel(memFile); in testDirectChannelAPIs() [all …]
|