Home
last modified time | relevance | path

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

12

/frameworks/base/services/core/java/com/android/server/display/whitebalance/
DAmbientSensor.java47 protected final SensorManager mSensorManager; field in AmbientSensor
83 mSensorManager = sensorManager; in AmbientSensor()
132 writer.println(" mSensorManager=" + mSensorManager); in dump()
177 if (mSensorManager == null) { in startListening()
180 mSensorManager.registerListener(mListener, mSensor, mRate * 1000, mHandler); in startListening()
184 if (mSensorManager == null) { in stopListening()
187 mSensorManager.unregisterListener(mListener); in stopListening()
251 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); in AmbientBrightnessSensor()
331 for (Sensor sensor : mSensorManager.getSensorList(Sensor.TYPE_ALL)) { in AmbientColorTemperatureSensor()
/frameworks/base/services/core/java/com/android/server/policy/
DWakeGestureListener.java34 private final SensorManager mSensorManager; field in WakeGestureListener
43 mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); in WakeGestureListener()
46 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_WAKE_GESTURE); in WakeGestureListener()
61 mSensorManager.requestTriggerSensor(mListener, mSensor); in requestWakeUpTrigger()
70 mSensorManager.cancelTriggerSensor(mListener, mSensor); in cancelWakeUpTrigger()
DWindowOrientationListener.java58 private SensorManager mSensorManager; field in WindowOrientationListener
92 mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); in WindowOrientationListener()
94 List<Sensor> l = mSensorManager.getSensorList(Sensor.TYPE_DEVICE_ORIENTATION); in WindowOrientationListener()
122 mSensor = mSensorManager.getDefaultSensor(USE_GRAVITY_SENSOR in WindowOrientationListener()
161 mSensorManager.registerListener( in enable()
164 mSensorManager.registerListener(mOrientationJudge, mSensor, mRate, mHandler); in enable()
183 mSensorManager.unregisterListener(mOrientationJudge); in disable()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DMotionSensor.java36 private SensorManager mSensorManager = null; field in MotionSensor
54 mSensorManager = (SensorManager)getContext().getApplicationContext() in onPrepare()
56 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); in onPrepare()
59 mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_UI); in onPrepare()
64 mSensorManager.unregisterListener(this); in onTearDown()
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/
DBalls.java54 private SensorManager mSensorManager; field in Balls
77 mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); in onCreate()
87 mSensorManager.registerListener(this, in onResume()
88 mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), in onResume()
106 mSensorManager.unregisterListener(this); in onStop()
/frameworks/base/core/java/android/view/
DOrientationEventListener.java35 private SensorManager mSensorManager; field in OrientationEventListener
69 mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); in OrientationEventListener()
71 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in OrientationEventListener()
93 mSensorManager.registerListener(mSensorEventListener, mSensor, mRate); in enable()
108 mSensorManager.unregisterListener(mSensorEventListener); in disable()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/
DMotionSensorWTime.java38 private SensorManager mSensorManager = null; field in MotionSensorWTime
60 mSensorManager = (SensorManager)getContext().getApplicationContext() in onPrepare()
62 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); in onPrepare()
65 mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_UI); in onPrepare()
70 mSensorManager.unregisterListener(this); in onTearDown()
/frameworks/base/services/core/java/com/android/server/
DSensorNotificationService.java56 private SensorManager mSensorManager; field in SensorNotificationService
74 mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE); in onBootPhase()
75 mMetaSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_DYNAMIC_SENSOR_META); in onBootPhase()
79 mSensorManager.registerListener(this, mMetaSensor, in onBootPhase()
152 mSensorManager.setOperationParameter(info); in onLocationChanged()
DAnyMotionDetector.java86 private SensorManager mSensorManager; field in AnyMotionDetector
125 mSensorManager = sm; in AnyMotionDetector()
126 mAccelSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); in AnyMotionDetector()
184 mSensorManager.unregisterListener(mListener); in stop()
200 if (mSensorManager.registerListener(mListener, mAccelSensor, in startOrientationMeasurementLocked()
218 mSensorManager.unregisterListener(mListener); in stopOrientationMeasurementLocked()
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeSensors.java65 private final SensorManager mSensorManager; field in DozeSensors
88 mSensorManager = sensorManager; in DozeSensors()
98 mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION), in DozeSensors()
104 mSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE), in DozeSensors()
162 return findSensorWithType(mSensorManager, type); in findSensorWithType()
301 Sensor sensor = ProximitySensor.findCustomProxSensor(mContext, mSensorManager); in ProxSensor()
307 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); in ProxSensor()
336 mRegistered = mSensorManager.registerListener(this, mSensor, in setRegistered()
339 mSensorManager.unregisterListener(this); in setRegistered()
446 mRegistered = mSensorManager.requestTriggerSensor(this, mSensor); in updateListening()
[all …]
DDozeScreenBrightness.java50 private final SensorManager mSensorManager; field in DozeScreenBrightness
77 mSensorManager = sensorManager; in DozeScreenBrightness()
204 mRegistered = mSensorManager.registerListener(this, mLightSensor, in setLightSensorEnabled()
208 mSensorManager.unregisterListener(this); in setLightSensorEnabled()
DDozeTriggers.java76 private final SensorManager mSensorManager; field in DozeTriggers
99 mSensorManager = sensorManager; in DozeTriggers()
103 mDozeSensors = new DozeSensors(context, alarmManager, mSensorManager, dozeParameters, in DozeTriggers()
440 Sensor sensor = ProximitySensor.findCustomProxSensor(mContext, mSensorManager); in check()
446 sensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); in check()
456 mSensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_NORMAL, 0, in check()
498 mSensorManager.unregisterListener(this);
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DProximitySensor.java42 private final AsyncSensorManager mSensorManager; field in ProximitySensor
62 mSensorManager = sensorManager; in ProximitySensor()
143 mSensorManager.registerListener( in register()
160 mSensorManager.unregisterListener(mSensorEventListener); in unregister()
/frameworks/base/core/java/android/hardware/
DLegacySensorManager.java40 private final SensorManager mSensorManager; field in LegacySensorManager
47 mSensorManager = sensorManager; in LegacySensorManager()
72 final List<Sensor> fullList = mSensorManager.getFullSensorList(); in getSensors()
114 Sensor sensor = mSensorManager.getDefaultSensor(type); in registerLegacyListener()
135 result = mSensorManager.registerListener(legacyListener, sensor, rate); in registerLegacyListener()
166 Sensor sensor = mSensorManager.getDefaultSensor(type); in unregisterLegacyListener()
180 mSensorManager.unregisterListener(legacyListener, sensor); in unregisterLegacyListener()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeScreenBrightnessTest.java60 FakeSensorManager mSensorManager; field in DozeScreenBrightnessTest
70 mSensorManager = new FakeSensorManager(mContext); in setUp()
71 mSensor = mSensorManager.getFakeLightSensor(); in setUp()
72 mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager, in setUp()
161 mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager, in testPulsing_withoutLightSensor_setsAoDDimmingScrimTransparent()
189 mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager, in testNullSensor()
DDozeSensorsTest.java66 private AsyncSensorManager mSensorManager; field in DozeSensorsTest
147 super(getContext(), mAlarmManager, mSensorManager, mDozeParameters, in TestableDozeSensors() local
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DAutomaticBrightnessControllerTest.java61 @Mock SensorManager mSensorManager; field in AutomaticBrightnessControllerTest
84 () -> { }, mContext.getMainLooper(), mSensorManager, lightSensor, in setupController()
108 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(lightSensor), in testNoHysteresisAtMinBrightness()
154 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(lightSensor), in testNoHysteresisAtMaxBrightness()
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DFalsingManagerImpl.java76 private final SensorManager mSensorManager; field in FalsingManagerImpl
142 mSensorManager = Dependency.get(AsyncSensorManager.class); in FalsingManagerImpl()
200 mSensorManager.unregisterListener(mSensorEventListener); in sessionExitpoint()
236 Sensor s = mSensorManager.getDefaultSensor(sensorType); in registerSensors()
241 mSensorManager.registerListener( in registerSensors()
556 mSensorManager.unregisterListener(mSensorEventListener); in cleanup()
/frameworks/base/services/core/java/com/android/server/power/
DWirelessChargerDetector.java101 private final SensorManager mSensorManager; field in WirelessChargerDetector
145 mSensorManager = sensorManager; in WirelessChargerDetector()
258 if (mSensorManager.registerListener(mListener, mGravitySensor, in startDetectionLocked()
275 mSensorManager.unregisterListener(mListener); in finishDetectionLocked()
/frameworks/native/opengl/tests/gl2_cameraeye/src/com/android/gl2cameraeye/
DGL2CameraEye.java78 mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); in CamGLSurfaceView()
79 mAcceleration = mSensorManager.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION); in CamGLSurfaceView()
97 mSensorManager.unregisterListener(this); in onPause()
112 mSensorManager.registerListener(this, mAcceleration, SensorManager.SENSOR_DELAY_GAME); in onResume()
133 SensorManager mSensorManager; field in CamGLSurfaceView
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DSarManager.java90 private final SensorManager mSensorManager; field in SarManager
109 mSensorManager = sensorManager; in SarManager()
528 List<Sensor> sensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL); in register()
541 if (!mSensorManager.registerListener(this, sensor, in register()
/frameworks/native/libs/sensor/
DSensorManager.cpp151 SensorManager& mSensorManager; in assertStateLocked() member in android::SensorManager::assertStateLocked::DeathObserver
154 mSensorManager.sensorManagerDied(); in assertStateLocked()
157 explicit DeathObserver(SensorManager& mgr) : mSensorManager(mgr) { } in assertStateLocked()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DSarManagerTest.java91 @Mock SystemSensorManager mSensorManager; field in SarManagerTest
162 when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(mSensorList); in prepareSensorInfo()
163 when(mSensorManager.registerListener(any(SensorEventListener.class), any(Sensor.class), in prepareSensorInfo()
199 mWifiNative, mSensorManager, mWifiMetrics); in createSarManager()
215 verify(mSensorManager).registerListener(sensorEventListenerCaptor.capture(), in createSarManager()
255 mWifiNative, mSensorManager, mWifiMetrics); in createSarManagerSensorNegTest()
709 verify(mSensorManager, never()).registerListener(any(SensorEventListener.class), in testSarMgr_error_sar_name_does_not_exist()
744 verify(mSensorManager, never()).registerListener(any(SensorEventListener.class), in testSarMgr_error_sar_name_mismatch()
777 verify(mSensorManager).registerListener(any(SensorEventListener.class), in testSarMgr_error_sar_register_failure()
/frameworks/base/services/core/java/com/android/server/display/
DAutomaticBrightnessController.java84 private final SensorManager mSensorManager; field in AutomaticBrightnessController
248 mSensorManager = sensorManager; in AutomaticBrightnessController()
482 mSensorManager.registerListener(mLightSensorListener, mLightSensor, in setLightSensorEnabled()
495 mSensorManager.unregisterListener(mLightSensorListener); in setLightSensorEnabled()
531 mSensorManager.unregisterListener(mLightSensorListener); in adjustLightSensorRate()
532 mSensorManager.registerListener(mLightSensorListener, mLightSensor, in adjustLightSensorRate()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/
DDeviceIdleControllerTest.java137 private SensorManager mSensorManager; field in DeviceIdleControllerTest
215 return mSensorManager; in getSensorManager()
234 super(mPowerManager, mock(Handler.class), mSensorManager, in AnyMotionDetectorForTest()
307 doReturn(mock(Sensor.class)).when(mSensorManager) in setUp()
309 doReturn(true).when(mSensorManager).registerListener(any(), any(), anyInt()); in setUp()
1692 doReturn(true).when(mSensorManager) in testStationaryDetection_QuickDozeOn_NoMotion()
1754 verify(mSensorManager, in testStationaryDetection_QuickDozeOn_NoMotion()
1790 InOrder inOrder = inOrder(stationaryListener, mSensorManager); in testStationaryDetection_QuickDozeOn_OneShot()
1797 inOrder.verify(mSensorManager) in testStationaryDetection_QuickDozeOn_OneShot()
1808 inOrder.verify(mSensorManager).requestTriggerSensor(eq(listener), eq(mMotionSensor)); in testStationaryDetection_QuickDozeOn_OneShot()
[all …]

12