Home
last modified time | relevance | path

Searched refs:lux (Results 1 – 23 of 23) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/log/
DALSProbeTest.java181 AtomicInteger lux = new AtomicInteger(-9); in testWatchDogCompletesAwait() local
182 mProbe.awaitNextLux((v) -> lux.set(Math.round(v)), null /* handler */); in testWatchDogCompletesAwait()
189 assertThat(lux.get()).isEqualTo(-1); in testWatchDogCompletesAwait()
217 AtomicInteger lux = new AtomicInteger(-1); in testNextLuxWhenAlreadyEnabled() local
218 mProbe.awaitNextLux((v) -> lux.set(Math.round(v)), null /* handler */); in testNextLuxWhenAlreadyEnabled()
230 assertThat(lux.get()).isEqualTo(values.get(dataIsAvailable ? values.size() - 1 : 0)); in testNextLuxWhenAlreadyEnabled()
254 AtomicInteger lux = new AtomicInteger(-1); in testNextLuxWhenNotEnabled() local
255 mProbe.awaitNextLux((v) -> lux.set(Math.round(v)), null /* handler */); in testNextLuxWhenNotEnabled()
269 assertThat(lux.get()).isEqualTo(values.get(0)); in testNextLuxWhenNotEnabled()
278 AtomicInteger lux = new AtomicInteger(-1); in testNextLuxIsNotCanceledByDisableOrDestroy() local
[all …]
/frameworks/base/core/tests/coretests/src/android/hardware/display/
DBrightnessConfigurationTest.java71 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurveMustHaveZeroLuxPoint() local
72 lux[0] = 1f; in testCurveMustHaveZeroLuxPoint()
73 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustHaveZeroLuxPoint()
89 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length + 1); in testCurveMustNotHaveArraysOfDifferentLengths()
90 lux[lux.length - 1] = lux[lux.length - 2] + 1; in testCurveMustNotHaveArraysOfDifferentLengths()
91 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustNotHaveArraysOfDifferentLengths()
104 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurvesMustNotContainNaN()
105 lux[lux.length - 1] = Float.NaN; in testCurvesMustNotContainNaN()
106 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurvesMustNotContainNaN()
202 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testEquals() local
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DBrightnessMappingStrategy.java152 private static float[] getLuxLevels(int[] lux) { in getLuxLevels() argument
154 float[] levels = new float[lux.length + 1]; in getLuxLevels()
155 for (int i = 0; i < lux.length; i++) { in getLuxLevels()
156 levels[i + 1] = (float) lux[i]; in getLuxLevels()
272 public abstract float getBrightness(float lux, String packageName, in getBrightness() argument
285 public float getBrightness(float lux) { in getBrightness() argument
286 return getBrightness(lux, null /* packageName */, ApplicationInfo.CATEGORY_UNDEFINED); in getBrightness()
342 public abstract void addUserDataPoint(float lux, float brightness); in addUserDataPoint() argument
430 float[] luxLevels, float[] brightnessLevels, float lux, float brightness) { in insertControlPoint() argument
431 final int idx = findInsertionPoint(luxLevels, lux); in insertControlPoint()
[all …]
DAutomaticBrightnessController.java547 private boolean setScreenBrightnessByUser(float lux, float brightness) { in setScreenBrightnessByUser() argument
548 if (lux == INVALID_LUX || Float.isNaN(brightness)) { in setScreenBrightnessByUser()
551 mCurrentBrightnessMapper.addUserDataPoint(lux, brightness); in setScreenBrightnessByUser()
552 mShortTermModel.setUserBrightness(lux, brightness); in setScreenBrightnessByUser()
708 private void handleLightSensorEvent(long time, float lux) { in handleLightSensorEvent() argument
709 Trace.traceCounter(Trace.TRACE_TAG_POWER, "ALS", (int) lux); in handleLightSensorEvent()
716 applyLightSensorMeasurement(time, lux); in handleLightSensorEvent()
720 private void applyLightSensorMeasurement(long time, float lux) { in applyLightSensorMeasurement() argument
723 mAmbientLightRingBuffer.push(time, lux); in applyLightSensorMeasurement()
725 mLastObservedLux = lux; in applyLightSensorMeasurement()
[all …]
DScreenOffBrightnessSensorController.java113 int lux = mSensorValueToLux[mLastSensorValue]; in getAutomaticScreenBrightness() local
114 if (lux < 0) { in getAutomaticScreenBrightness()
118 return mBrightnessMapper.getBrightness(lux); in getAutomaticScreenBrightness()
DDisplayDeviceConfig.java1136 public float getMinNitsFromLux(float lux) { in getMinNitsFromLux() argument
1140 return mEvenDimmerBrightnessData.mMinLuxToNits.interpolate(lux); in getMinNitsFromLux()
2593 float lux = point.getFirst().floatValue(); in loadLuxThrottling() local
2599 + type + "; lux=" + lux + "; maxBrightness=" in loadLuxThrottling()
2603 if (luxToTransitionPointMap.containsKey(lux)) { in loadLuxThrottling()
2606 + lux); in loadLuxThrottling()
2609 luxToTransitionPointMap.put(lux, in loadLuxThrottling()
2861 public static float[] getLuxLevels(int[] lux) { in getLuxLevels() argument
2863 float[] levels = new float[lux.length + 1]; in getLuxLevels()
2864 for (int i = 0; i < lux.length; i++) { in getLuxLevels()
[all …]
DDisplayManagerService.java622 float[] lux = getFloatArray(resources.obtainTypedArray( in DisplayManagerService() local
626 mMinimumBrightnessCurve = new Curve(lux, nits); in DisplayManagerService()
627 mMinimumBrightnessSpline = Spline.createSpline(lux, nits); in DisplayManagerService()
2689 float[] lux = curve.first; in isBrightnessConfigurationTooDark() local
2691 for (int i = 0; i < lux.length; i++) { in isBrightnessConfigurationTooDark()
2692 if (nits[i] < mMinimumBrightnessSpline.interpolate(lux[i])) { in isBrightnessConfigurationTooDark()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/
DAutomaticBrightnessControllerTest.java742 final float lux = 100.0f;
743 when(mAmbientBrightnessThresholds.getBrighteningThreshold(lux))
744 .thenReturn(lux);
745 when(mAmbientBrightnessThresholds.getDarkeningThreshold(lux))
746 .thenReturn(lux);
747 when(mBrightnessMappingStrategy.getBrightness(eq(lux), eq(null), anyInt()))
751 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux));
788 int lux = 5000;
790 lux += increment;
792 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, lux));
[all …]
DBrightnessMappingStrategyTest.java190 final float lux = (LUX_LEVELS[i - 1] + LUX_LEVELS[i]) / 2; in testSimpleStrategyMappingBetweenControlPoints() local
191 final float brightness = simple.getBrightness(lux); in testSimpleStrategyMappingBetweenControlPoints()
204 final float[] lux = { 0f, 1f }; in testSimpleStrategyIgnoresNewConfiguration() local
207 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testSimpleStrategyIgnoresNewConfiguration()
257 final float lux = (LUX_LEVELS[i - 1] + LUX_LEVELS[i]) / 2.0f; in testPhysicalStrategyMappingBetweenControlPoints() local
258 final float brightness = physical.getBrightness(lux); in testPhysicalStrategyMappingBetweenControlPoints()
273 final float[] lux = {0f, 1f}; in testPhysicalStrategyUsesNewConfigurations() local
279 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testPhysicalStrategyUsesNewConfigurations()
350 final float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testNonStrictlyIncreasingLuxLevelsFails() local
351 final int idx = lux.length / 2; in testNonStrictlyIncreasingLuxLevelsFails()
[all …]
DPersistentDataStoreTest.java275 final float[] lux = { 0f, 10f }; in testStoreAndReloadOfDisplayBrightnessConfigurations() local
277 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testStoreAndReloadOfDisplayBrightnessConfigurations()
322 final float[] lux = { 0f, 10f }; in testSetBrightnessConfigurationFailsWithUnstableId() local
324 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testSetBrightnessConfigurationFailsWithUnstableId()
350 final float[] lux = { 0f, 10f }; in testStoreAndReloadOfBrightnessConfigurations() local
352 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testStoreAndReloadOfBrightnessConfigurations()
380 final float[] lux = { 0f, 10f }; in testNullBrightnessConfiguration() local
383 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testNullBrightnessConfiguration()
DBrightnessTrackerTest.java915 private SensorEvent createSensorEvent(float lux) { in createSensorEvent() argument
925 event.values[0] = lux; in createSensorEvent()
DDisplayManagerServiceTest.java914 float[] lux = minimumBrightnessCurve.getX();
930 new BrightnessConfiguration.Builder(lux, nits).build();
949 float[] lux = minimumBrightnessCurve.getX();
951 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits).build();
DDisplayPowerControllerTest.java1212 float lux = 2000; in testShortTermModelPersistsWhenDisplayDeviceChanges() local
1214 when(mHolder.automaticBrightnessController.getUserLux()).thenReturn(lux); in testShortTermModelPersistsWhenDisplayDeviceChanges()
1253 eq(lux), in testShortTermModelPersistsWhenDisplayDeviceChanges()
/frameworks/base/core/java/android/hardware/display/
DBrightnessConfiguration.java79 private BrightnessConfiguration(float[] lux, float[] nits, in BrightnessConfiguration() argument
86 mLux = lux; in BrightnessConfiguration()
303 float[] lux = in.createFloatArray();
305 Builder builder = new Builder(lux, nits);
430 final float lux = loadFloatFromXml(parser, ATTR_LUX); in loadFromXml() local
432 luxList.add(lux); in loadFromXml()
462 float[] lux = new float[n]; in loadFromXml() local
465 lux[i] = luxList.get(i); in loadFromXml()
468 final BrightnessConfiguration.Builder builder = new BrightnessConfiguration.Builder(lux, in loadFromXml()
528 public Builder(float[] lux, float[] nits) { in Builder() argument
[all …]
/frameworks/base/services/core/java/com/android/server/display/brightness/clamper/
DBrightnessStateModifier.java57 void setAmbientLux(float lux); in setAmbientLux() argument
DBrightnessLowPowerModeModifier.java61 public void setAmbientLux(float lux) { in setAmbientLux() argument
DBrightnessLowLuxModifier.java129 public void setAmbientLux(float lux) { in setAmbientLux() argument
130 mAmbientLux = lux; in setAmbientLux()
DDisplayDimModifier.java86 public void setAmbientLux(float lux) { in setAmbientLux() argument
DBrightnessClamperController.java122 final float lux = mAmbientFilter.getEstimate(now); in BrightnessClamperController()
123 mModifiers.forEach(mModifier -> mModifier.setAmbientLux(lux)); in BrightnessClamperController()
/frameworks/base/services/core/java/com/android/server/display/brightness/
DBrightnessEvent.java270 public void setLux(float lux) { in setLux() argument
271 this.mLux = lux; in setLux()
/frameworks/base/services/core/java/com/android/server/display/mode/
DDisplayModeDirector.java2260 private boolean isInsideLowZone(float brightness, float lux) { in isInsideLowZone() argument
2266 if (brightness <= disp && lux <= ambi) { in isInsideLowZone()
2274 if (lux <= ambi) { in isInsideLowZone()
2291 private boolean isInsideHighZone(float brightness, float lux) { in isInsideHighZone() argument
2297 if (brightness >= disp && lux >= ambi) { in isInsideHighZone()
2305 if (lux >= ambi) { in isInsideHighZone()
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/mode/
DDisplayModeDirectorTest.java3769 getIdleScreenRefreshRateTimeoutLuxThresholdPoint(int lux, int timeout) { in getIdleScreenRefreshRateTimeoutLuxThresholdPoint() argument
3773 idleScreenRefreshRateTimeoutLuxThresholdPoint.setLux(BigInteger.valueOf(lux)); in getIdleScreenRefreshRateTimeoutLuxThresholdPoint()
/frameworks/proto_logging/stats/
Datoms.proto6363 // The ambient light lux when authenticated.
6471 // The ambient light lux when the user enrolled.
23300 // Estimated ambient light, in lux.
23301 optional float lux = 3; field
23364 // Whether ambient lux is invalid.
23906 * expressed as a curve where each point is a pair of ambient light (lux) and the corresponding
23913 // Array of ambient light values (in lux) to define the configuration.
23914 repeated float lux = 1; field
23915 // Array of screen brightness values (in nits) corresponding to the lux