Home
last modified time | relevance | path

Searched refs:mSensorManager (Results 1 – 11 of 11) sorted by relevance

/packages/apps/Camera2/src/com/android/camera/hardware/
DHeadingSensor.java39 private final SensorManager mSensorManager; field in HeadingSensor
59 mSensorManager = sensorManager; in HeadingSensor()
60 mAccelerometerSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in HeadingSensor()
61 mMagneticSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD); in HeadingSensor()
81 mSensorManager.registerListener(this, mAccelerometerSensor, in activate()
85 mSensorManager.registerListener(this, mMagneticSensor, in activate()
96 mSensorManager.unregisterListener(this, mAccelerometerSensor); in deactivate()
99 mSensorManager.unregisterListener(this, mMagneticSensor); in deactivate()
/packages/modules/Uwb/service/java/com/android/server/uwb/correction/pose/
DRotationPoseSource.java46 private final SensorManager mSensorManager; field in RotationPoseSource
63 mSensorManager = context.getSystemService(SensorManager.class); in RotationPoseSource()
64 if (mSensorManager == null) { in RotationPoseSource()
67 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); in RotationPoseSource()
79 mSensorManager.registerListener(this, mSensor, mIntervalUs); in start()
87 mSensorManager.unregisterListener(this); in stop()
DIntegPoseSource.java65 private final SensorManager mSensorManager; field in IntegPoseSource
87 mSensorManager = context.getSystemService(SensorManager.class); in IntegPoseSource()
88 mRotationSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ROTATION_VECTOR); in IntegPoseSource()
93 mAccelSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); in IntegPoseSource()
107 mSensorManager.registerListener(this, mRotationSensor, mIntervalUs); in start()
108 mSensorManager.registerListener(this, mAccelSensor, mIntervalUs); in start()
116 mSensorManager.unregisterListener(this); in stop()
DSixDofPoseSource.java48 private final SensorManager mSensorManager; field in SixDofPoseSource
65 mSensorManager = context.getSystemService(SensorManager.class); in SixDofPoseSource()
66 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_POSE_6DOF); in SixDofPoseSource()
80 mSensorManager.registerListener(this, mSensor, mIntervalUs); in start()
88 mSensorManager.unregisterListener(this); in stop()
DGyroPoseSource.java51 private final SensorManager mSensorManager; field in GyroPoseSource
72 mSensorManager = context.getSystemService(SensorManager.class); in GyroPoseSource()
73 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); in GyroPoseSource()
86 mSensorManager.registerListener(this, mSensor, mIntervalUs); in start()
94 mSensorManager.unregisterListener(this); in stop()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DSystemStateHelperTest.java80 @Mock SensorManager mSensorManager; field in SystemStateHelperTest
91 doReturn(mSensorManager).when(mContext).getSystemService(SensorManager.class); in setUp()
95 when(mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY)).thenReturn(mGravitySensor); in setUp()
96 when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn(mProxSensor); in setUp()
295 }).when(mSensorManager) in testDeviceOnEarCorrectlyDetected()
299 verify(mSensorManager).unregisterListener(any(SensorEventListener.class)); in testDeviceOnEarCorrectlyDetected()
315 }).when(mSensorManager) in testDeviceIsNotOnEarWithProxNotSensed()
319 verify(mSensorManager).unregisterListener(any(SensorEventListener.class)); in testDeviceIsNotOnEarWithProxNotSensed()
336 }).when(mSensorManager) in testDeviceIsNotOnEarWithWrongOrientation()
340 verify(mSensorManager).unregisterListener(any(SensorEventListener.class)); in testDeviceIsNotOnEarWithWrongOrientation()
[all …]
/packages/apps/DevCamera/src/com/android/devcamera/
DGyroOperations.java32 private SensorManager mSensorManager; field in GyroOperations
46 mSensorManager = sensorManager; in GyroOperations()
50mSensorManager.registerListener(mSensorEventListener, mSensorManager.getDefaultSensor(Sensor.TYPE_… in startListening()
55 mSensorManager.unregisterListener(mSensorEventListener); in stopListening()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/
DKitchenSinkHelperImpl.java54 private CarSensorManager mSensorManager; field in KitchenSinkHelperImpl
139 if (mSensorManager == null) { in getSensorManager()
140 mSensorManager = (CarSensorManager) mCarApi.getCarManager( in getSensorManager()
143 return mSensorManager; in getSensorManager()
235 mSensorManager = null; in initCarApi()
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/
DDoubleTwistPreferenceControllerTest.java59 private SensorManager mSensorManager; field in DoubleTwistPreferenceControllerTest
83 when(mContext.getSystemService(Context.SENSOR_SERVICE)).thenReturn(mSensorManager); in isAvailable_hasSensor_shouldReturnTrue()
84 when(mSensorManager.getSensorList(anyInt())).thenReturn(sensorList); in isAvailable_hasSensor_shouldReturnTrue()
102 when(mContext.getSystemService(Context.SENSOR_SERVICE)).thenReturn(mSensorManager); in isAvailable_differentSensor_shouldReturnFalse()
103 when(mSensorManager.getSensorList(anyInt())).thenReturn(sensorList); in isAvailable_differentSensor_shouldReturnFalse()
/packages/modules/AdServices/sdksandbox/tests/manual-test-apps/SdkSandboxCodeProvider/src/com/android/sdksandboxcode_1/
DActivityHandler.java61 private final SensorManager mSensorManager; field in ActivityHandler
72 mSensorManager = sdkContext.getSystemService(SensorManager.class); in ActivityHandler()
73 mGyroSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); in ActivityHandler()
207 mSensorManager.registerListener( in registerLifecycleListener()
214 mSensorManager.unregisterListener(activityHandler); in registerLifecycleListener()
/packages/apps/LegacyCamera/src/com/android/camera/panorama/
DPanoramaActivity.java155 private SensorManager mSensorManager; field in PanoramaActivity
278 mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); in onCreate()
279 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE); in onCreate()
281 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION); in onCreate()