Home
last modified time | relevance | path

Searched refs:mLightSensor (Results 1 – 17 of 17) sorted by relevance

/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
DAutomaticBrightnessControllerTest.java91 private Sensor mLightSensor; field in AutomaticBrightnessControllerTest
113 mLightSensor = TestUtils.createSensor(Sensor.TYPE_LIGHT, "Light Sensor"); in setUp()
168 () -> { }, mTestLooper.getLooper(), mSensorManager, mLightSensor, in setupController()
204 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testNoHysteresisAtMinBrightness()
226 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux1)); in testNoHysteresisAtMinBrightness()
240 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux2)); in testNoHysteresisAtMinBrightness()
248 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testNoHysteresisAtMaxBrightness()
269 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux1)); in testNoHysteresisAtMaxBrightness()
284 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux2)); in testNoHysteresisAtMaxBrightness()
292 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testUserAddUserDataPoint()
[all …]
DScreenOffBrightnessSensorControllerTest.java55 private Sensor mLightSensor; field in ScreenOffBrightnessSensorControllerTest
66 mLightSensor = TestUtils.createSensor(Sensor.TYPE_LIGHT, "Light Sensor"); in setUp()
69 mLightSensor, in setUp()
88 when(mSensorManager.registerListener(any(SensorEventListener.class), eq(mLightSensor), in testBrightness()
94 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testBrightness()
98 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 0)); in testBrightness()
104 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness()
111 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness()
118 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness()
125 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness()
[all …]
DBrightnessTrackerTest.java831 assertEquals(mInjector.mLightSensor, mLightSensorFake); in testLightSensorChange()
837 assertNull(mInjector.mLightSensor); in testLightSensorChange()
843 assertEquals(mInjector.mLightSensor, mLightSensorFake); in testLightSensorChange()
850 assertEquals(mInjector.mLightSensor, secondSensor); in testLightSensorChange()
864 assertNull(mInjector.mLightSensor); in testNullLightSensorWontRegister()
869 assertNull(mInjector.mLightSensor); in testOnlyOneReceiverRegistered()
876 assertNotNull(mInjector.mLightSensor); in testOnlyOneReceiverRegistered()
881 Sensor registeredLightSensor = mInjector.mLightSensor; in testOnlyOneReceiverRegistered()
887 assertSame(registeredLightSensor, mInjector.mLightSensor); in testOnlyOneReceiverRegistered()
893 assertNull(mInjector.mLightSensor); in testOnlyOneReceiverRegistered()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/log/
DALSProbeTest.java74 private Sensor mLightSensor = new Sensor( field in ALSProbeTest
83 when(mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT)).thenReturn(mLightSensor); in setup()
96 new SensorEvent(mLightSensor, 1, 1, new float[]{4.0f})); in testEnable()
98 new SensorEvent(mLightSensor, 1, 2, new float[]{value})); in testEnable()
141 new SensorEvent(mLightSensor, 1, 1, new float[]{4.0f})); in testDisabledReportsNegativeValue()
153 new SensorEvent(mLightSensor, 1, 1, new float[]{4.0f})); in testWatchDog()
214 new SensorEvent(mLightSensor, 1, 1, new float[]{v})); in testNextLuxWhenAlreadyEnabled()
222 new SensorEvent(mLightSensor, 1, 1, new float[]{v})); in testNextLuxWhenAlreadyEnabled()
227 new SensorEvent(mLightSensor, 1, 1, new float[]{200f})); in testNextLuxWhenAlreadyEnabled()
236 new SensorEvent(mLightSensor, 1, 1, new float[]{12})); in testNextLuxWhenAlreadyEnabled()
[all …]
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/whitebalance/
DAmbientSensorTest.java62 private Sensor mLightSensor; field in AmbientSensorTest
72 mLightSensor = TestUtils.createSensor(Sensor.TYPE_LIGHT, null); in setUp()
81 when(mSensorManagerMock.getDefaultSensor(Sensor.TYPE_LIGHT)).thenReturn(mLightSensor); in testAmbientBrightnessSensorCallback_NoCallbacks()
95 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 100)); in testAmbientBrightnessSensorCallback_NoCallbacks()
101 when(mSensorManagerMock.getDefaultSensor(Sensor.TYPE_LIGHT)).thenReturn(mLightSensor); in testAmbientBrightnessSensorCallback_CallbacksCalled()
118 verify(mSensorManagerMock).registerListener(captor.capture(), eq(mLightSensor), in testAmbientBrightnessSensorCallback_CallbacksCalled()
121 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, luxValue)); in testAmbientBrightnessSensorCallback_CallbacksCalled()
129 final List<Sensor> sensorList = ImmutableList.of(mLightSensor, mAmbientColorSensor); in testAmbientColorTemperatureSensorCallback_CallbacksCalled()
DAmbientLuxTest.java73 private Sensor mLightSensor; field in AmbientLuxTest
100 mLightSensor = TestUtils.createSensor(Sensor.TYPE_LIGHT, null); in setUp()
105 when(mSensorManagerMock.getDefaultSensor(Sensor.TYPE_LIGHT)).thenReturn(mLightSensor); in setUp()
106 final List<Sensor> sensorList = ImmutableList.of(mLightSensor, mAmbientColorSensor); in setUp()
/frameworks/base/services/core/java/com/android/server/biometrics/log/
DALSProbe.java45 private final Sensor mLightSensor; field in ALSProbe
98 mLightSensor = sensorManager != null in ALSProbe()
103 if (mSensorManager == null || mLightSensor == null) { in ALSProbe()
182 } else if (mLightSensor != null) { in awaitNextLux()
193 if (!mEnabled && mLightSensor != null) { in enableLightSensorLoggingLocked()
196 mSensorManager.registerListener(mLightSensorListener, mLightSensor, in enableLightSensorLoggingLocked()
207 if (mEnabled && mLightSensor != null) { in disableLightSensorLoggingLocked()
/frameworks/base/services/core/java/com/android/server/sensorprivacy/
DCameraPrivacyLightController.java70 private final Sensor mLightSensor; field in CameraPrivacyLightController
107 mLightSensor = null; in CameraPrivacyLightController()
145 mLightSensor = null; in CameraPrivacyLightController()
155 mLightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT); in CameraPrivacyLightController()
242 mLightSensor == null ? mColors[mColors.length - 1] : computeCurrentLightColor(); in updateLightSession()
282 if (!shouldSessionEnd && !mIsAmbientLightListenerRegistered && mLightSensor != null) { in updateSensorListener()
283 mSensorManager.registerListener(this, mLightSensor, SENSOR_DELAY_NORMAL, mHandler); in updateSensorListener()
/frameworks/base/services/core/java/com/android/server/display/
DScreenOffBrightnessSensorController.java43 private final Sensor mLightSensor; field in ScreenOffBrightnessSensorController
62 mLightSensor = lightSensor; in ScreenOffBrightnessSensorController()
86 mRegistered = mSensorManager.registerListener(this, mLightSensor, in setLightSensorEnabled()
DBrightnessTracker.java160 private Sensor mLightSensor; field in BrightnessTracker
444 if (mLightSensor != lightSensor) { in handleSensorChanged()
445 mLightSensor = lightSensor; in handleSensorChanged()
455 && mLightSensor != null in startSensorListener()
461 mInjector.registerSensorListener(mContext, mSensorListener, mLightSensor, in startSensorListener()
787 pw.println(" mLightSensor=" + mLightSensor); in dump()
DAutomaticBrightnessController.java116 private final Sensor mLightSensor; field in AutomaticBrightnessController
358 mLightSensor = lightSensor; in AutomaticBrightnessController()
607 pw.println(" mLightSensor=" + mLightSensor); in dump()
685 mSensorManager.registerListener(mLightSensorListener, mLightSensor, in setLightSensorEnabled()
739 mSensorManager.registerListener(mLightSensorListener, mLightSensor, in adjustLightSensorRate()
DDisplayPowerController.java460 private Sensor mLightSensor; field in DisplayPowerController
1102 mBrightnessTracker.setLightSensor(mLightSensor); in setUpAutoBrightness()
1109 this, handler.getLooper(), mSensorManager, mLightSensor, in setUpAutoBrightness()
2218 mLightSensor = SensorUtils.findSensor(mSensorManager, in loadAmbientLightSensor()
2583 pw.println(" mLightSensor=" + mLightSensor); in dump()
/frameworks/base/services/core/java/com/android/server/input/
DAmbientKeyboardBacklightController.java75 private Sensor mLightSensor; field in AmbientKeyboardBacklightController
125 addSensorListener(mLightSensor); in registerAmbientBacklightListener()
140 removeSensorListener(mLightSensor); in unregisterAmbientBacklightListener()
251 removeSensorListener(mLightSensor); in handleDisplayChange()
253 mLightSensor = getAmbientLightSensor( in handleDisplayChange()
257 addSensorListener(mLightSensor); in handleDisplayChange()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/
DBrightnessClamperControllerTest.java91 Sensor mLightSensor; field in BrightnessClamperControllerTest
104 mLightSensor = TestUtils.createSensor(Sensor.TYPE_LIGHT, "Light Sensor"); in setUp()
106 when(mSensorManager.getDefaultSensor(anyInt())).thenReturn(mLightSensor); in setUp()
267 verify(mSensorManager).registerListener(listenerCaptor.capture(), eq(mLightSensor), in testAmbientLuxChanges()
271 when(mSensorManager.getSensorList(eq(Sensor.TYPE_ALL))).thenReturn(List.of(mLightSensor)); in testAmbientLuxChanges()
280 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 50, mClock.now())); in testAmbientLuxChanges()
283 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 300, mClock.now())); in testAmbientLuxChanges()
/frameworks/base/services/core/java/com/android/server/display/brightness/clamper/
DBrightnessClamperController.java90 private Sensor mLightSensor; field in BrightnessClamperController
234 writer.println(" mLightSensor=" + mLightSensor); in dump()
285 mLightSensor = mInjector.getLightSensor( in start()
425 if (mRegisteredLightSensor == mLightSensor) { in maybeRegisterLightSensor()
435 mLightSensor, mLightSensorRate * 1000, mHandler); in maybeRegisterLightSensor()
436 mRegisteredLightSensor = mLightSensor; in maybeRegisterLightSensor()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/sensorprivacy/
DCameraPrivacyLightControllerTest.java91 private Sensor mLightSensor; field in CameraPrivacyLightControllerTest
151 mLightSensor = null; in prepareCameraPrivacyLightController()
153 doReturn(mLightSensor).when(mSensorManager).getDefaultSensor(Sensor.TYPE_LIGHT); in prepareCameraPrivacyLightController()
350 eq(mLightSensor), anyInt(), any()); in notifySensorEvent()
351 mLightSensorListenerCaptor.getValue().onSensorChanged(new SensorEvent(mLightSensor, 0, in notifySensorEvent()
/frameworks/base/services/core/java/com/android/server/display/mode/
DDisplayModeDirector.java1675 private Sensor mLightSensor; field in DisplayModeDirector.BrightnessObserver
2126 pw.println(" mLightSensor: " + mLightSensor); in dumpLocked()
2195 if (lightSensor != null && lightSensor != mLightSensor) { in restartObserver()
2199 mLightSensor = lightSensor; in restartObserver()
2203 mLightSensor = null; in restartObserver()
2444 if (mRegisteredLightSensor == mLightSensor) { in registerLightSensor()
2453 mLightSensor, LIGHT_SENSOR_RATE_MS * 1000, mHandler); in registerLightSensor()
2454 mRegisteredLightSensor = mLightSensor; in registerLightSensor()