Home
last modified time | relevance | path

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

12

/frameworks/base/services/core/java/com/android/server/display/whitebalance/
DAmbientSensor.java48 protected final SensorManager mSensorManager; field in AmbientSensor
84 mSensorManager = sensorManager; in AmbientSensor()
133 writer.println(" mSensorManager=" + mSensorManager); in dump()
178 if (mSensorManager == null) { in startListening()
181 mSensorManager.registerListener(mListener, mSensor, mRate * 1000, mHandler); in startListening()
185 if (mSensorManager == null) { in stopListening()
188 mSensorManager.unregisterListener(mListener); in stopListening()
252 mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); in AmbientBrightnessSensor()
332 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.java54 private SensorManager mSensorManager; field in SensorNotificationService
72 mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE); in onBootPhase()
73 mMetaSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_DYNAMIC_SENSOR_META); in onBootPhase()
77 mSensorManager.registerListener(this, mMetaSensor, in onBootPhase()
150 mSensorManager.setOperationParameter(info); in onLocationChanged()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeSensorsTest.java69 private AsyncSensorManager mSensorManager; field in DozeSensorsTest
131 verify(mSensorManager, never()).registerListener(any(), any(Sensor.class), anyInt()); in testSetListening_firstTrue_registerSettingsObserver()
139 verify(mSensorManager, never()).registerListener(any(), any(Sensor.class), anyInt()); in testSetListening_twiceTrue_onlyRegisterSettingsObserverOnce()
148 verify(mSensorManager, never()).registerListener(any(), any(Sensor.class), anyInt()); in testSetPaused_doesntPause_sensors()
171 super(getContext(), mAlarmManager, mSensorManager, mDozeParameters, in TestableDozeSensors() local
DDozeScreenBrightnessTest.java68 FakeSensorManager mSensorManager; field in DozeScreenBrightnessTest
86 mSensorManager = new FakeSensorManager(mContext); in setUp()
87 mSensor = mSensorManager.getFakeLightSensor(); in setUp()
88 mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager, in setUp()
177 mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager, in testPulsing_withoutLightSensor_setsAoDDimmingScrimTransparent()
216 mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager, in testNullSensor()
/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/src/com/android/systemui/util/sensors/
DProximitySensor.java47 private final AsyncSensorManager mSensorManager; field in ProximitySensor
71 mSensorManager = sensorManager; in ProximitySensor()
127 List<Sensor> sensorList = mSensorManager.getSensorList(Sensor.TYPE_ALL); in findCustomProxSensor()
191 mSensorManager.registerListener(mSensorEventListener, mSensor, mSensorDelay); in registerInternal()
212 mSensorManager.unregisterListener(mSensorEventListener); in unregisterInternal()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DAutomaticBrightnessControllerTest.java58 @Mock SensorManager mSensorManager; field in AutomaticBrightnessControllerTest
81 () -> { }, mContext.getMainLooper(), mSensorManager, lightSensor, in setupController()
106 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(lightSensor), in testNoHysteresisAtMinBrightness()
153 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(lightSensor), in testNoHysteresisAtMaxBrightness()
200 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(lightSensor), in testUserAddUserDataPoint()
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DDozeScreenBrightness.java51 private final SensorManager mSensorManager; field in DozeScreenBrightness
80 mSensorManager = sensorManager; in DozeScreenBrightness()
210 mRegistered = mSensorManager.registerListener(this, mLightSensor, in setLightSensorEnabled()
214 mSensorManager.unregisterListener(this); in setLightSensorEnabled()
DDozeSensors.java67 private final AsyncSensorManager mSensorManager; field in DozeSensors
108 mSensorManager = sensorManager; in DozeSensors()
120 mSensorManager.getDefaultSensor(Sensor.TYPE_SIGNIFICANT_MOTION), in DozeSensors()
126 mSensorManager.getDefaultSensor(Sensor.TYPE_PICK_UP_GESTURE), in DozeSensors()
207 return findSensorWithType(mSensorManager, type); in findSensorWithType()
400 mRegistered = mSensorManager.requestTriggerSensor(this, mSensor); in updateListening()
403 final boolean rt = mSensorManager.cancelTriggerSensor(this, mSensor); in updateListening()
507 AsyncSensorManager asyncSensorManager = (AsyncSensorManager) mSensorManager; in updateListening()
DDozeTriggers.java81 private final AsyncSensorManager mSensorManager; field in DozeTriggers
163 mSensorManager = sensorManager; in DozeTriggers()
166 mDozeSensors = new DozeSensors(context, alarmManager, mSensorManager, dozeParameters, in DozeTriggers()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/
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/classifier/
DFalsingManagerImpl.java78 private final SensorManager mSensorManager; field in FalsingManagerImpl
145 mSensorManager = Dependency.get(AsyncSensorManager.class); in FalsingManagerImpl()
203 mSensorManager.unregisterListener(mSensorEventListener); in sessionExitpoint()
239 Sensor s = mSensorManager.getDefaultSensor(sensorType); in registerSensors()
244 mSensorManager.registerListener( in registerSensors()
563 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/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/base/services/core/java/com/android/server/display/
DAutomaticBrightnessController.java83 private final SensorManager mSensorManager; field in AutomaticBrightnessController
242 mSensorManager = sensorManager; in AutomaticBrightnessController()
475 mSensorManager.registerListener(mLightSensorListener, mLightSensor, in setLightSensorEnabled()
488 mSensorManager.unregisterListener(mLightSensorListener); in setLightSensorEnabled()
524 mSensorManager.unregisterListener(mLightSensorListener); in adjustLightSensorRate()
525 mSensorManager.registerListener(mLightSensorListener, mLightSensor, in adjustLightSensorRate()
DDisplayModeDirector.java1084 private SensorManager mSensorManager; field in DisplayModeDirector.BrightnessObserver
1117 mSensorManager = sensorManager; in observe()
1227 List<Sensor> sensors = mSensorManager.getSensorList(Sensor.TYPE_ALL); in restartObserver()
1238 lightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); in restartObserver()
1328 if (mSensorManager == null || mLightSensorListener == null) { in updateSensorStatus()
1334 mSensorManager.registerListener(mLightSensorListener, in updateSensorStatus()
1338 mSensorManager.unregisterListener(mLightSensorListener); in updateSensorStatus()
DDisplayPowerController.java157 private final SensorManager mSensorManager; field in DisplayPowerController
409 mSensorManager = sensorManager; in DisplayPowerController()
529 mProximitySensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); in DisplayPowerController()
548 mSensorManager, resources); in DisplayPowerController()
560 List<Sensor> sensors = mSensorManager.getSensorList(Sensor.TYPE_ALL); in findDisplayLightSensor()
568 return mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); in findDisplayLightSensor()
1532 mSensorManager.registerListener(mProximitySensorListener, mProximitySensor, in setProximitySensorEnabled()
1543 mSensorManager.unregisterListener(mProximitySensorListener); in setProximitySensorEnabled()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/
DDeviceIdleControllerTest.java141 private SensorManager mSensorManager; field in DeviceIdleControllerTest
224 return mSensorManager; in getSensorManager()
243 super(mPowerManager, mock(Handler.class), mSensorManager, in AnyMotionDetectorForTest()
316 doReturn(mock(Sensor.class)).when(mSensorManager) in setUp()
318 doReturn(true).when(mSensorManager).registerListener(any(), any(), anyInt()); in setUp()
1806 doReturn(true).when(mSensorManager) in testStationaryDetection_QuickDozeOn_NoMotion()
1868 verify(mSensorManager, in testStationaryDetection_QuickDozeOn_NoMotion()
1904 InOrder inOrder = inOrder(stationaryListener, mSensorManager); in testStationaryDetection_QuickDozeOn_OneShot()
1911 inOrder.verify(mSensorManager) in testStationaryDetection_QuickDozeOn_OneShot()
1922 inOrder.verify(mSensorManager).requestTriggerSensor(eq(listener), eq(mMotionSensor)); in testStationaryDetection_QuickDozeOn_OneShot()
[all …]

12