/frameworks/base/services/core/java/com/android/server/display/ |
D | BrightnessMappingStrategy.java | 160 private static float[] getLuxLevels(int[] lux) { in getLuxLevels() argument 162 float[] levels = new float[lux.length + 1]; in getLuxLevels() 163 for (int i = 0; i < lux.length; i++) { in getLuxLevels() 164 levels[i + 1] = (float) lux[i]; in getLuxLevels() 280 public abstract float getBrightness(float lux, String packageName, in getBrightness() argument 293 public float getBrightness(float lux) { in getBrightness() argument 294 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 …]
|
D | AutomaticBrightnessController.java | 361 brightnessEvent.lux = in getAutomaticScreenBrightness() 505 private boolean setScreenBrightnessByUser(float lux, float brightness) { in setScreenBrightnessByUser() argument 506 mCurrentBrightnessMapper.addUserDataPoint(lux, brightness); in setScreenBrightnessByUser() 508 mShortTermModelAnchor = lux; in setScreenBrightnessByUser() 667 private void handleLightSensorEvent(long time, float lux) { in handleLightSensorEvent() argument 668 Trace.traceCounter(Trace.TRACE_TAG_POWER, "ALS", (int) lux); in handleLightSensorEvent() 675 applyLightSensorMeasurement(time, lux); in handleLightSensorEvent() 679 private void applyLightSensorMeasurement(long time, float lux) { in applyLightSensorMeasurement() argument 682 mAmbientLightRingBuffer.push(time, lux); in applyLightSensorMeasurement() 685 mLastObservedLux = lux; in applyLightSensorMeasurement() [all …]
|
D | ScreenOffBrightnessSensorController.java | 106 int lux = mSensorValueToLux[mLastSensorValue]; in getAutomaticScreenBrightness() local 107 if (lux < 0) { in getAutomaticScreenBrightness() 111 return mBrightnessMapper.getBrightness(lux); in getAutomaticScreenBrightness()
|
D | DisplayPowerController.java | 3001 event.lux, 3025 public float lux; 3055 lux = that.lux; 3079 lux = 0f; 3119 && Float.floatToRawIntBits(lux) == Float.floatToRawIntBits(that.lux) 3145 + ", lux=" + lux
|
D | DisplayModeDirector.java | 2100 private boolean isInsideLowZone(int brightness, float lux) { in isInsideLowZone() argument 2106 if (brightness <= disp && lux <= ambi) { in isInsideLowZone() 2114 if (lux <= ambi) { in isInsideLowZone() 2123 private boolean isInsideHighZone(int brightness, float lux) { in isInsideHighZone() argument 2129 if (brightness >= disp && lux >= ambi) { in isInsideHighZone() 2137 if (lux >= ambi) { in isInsideHighZone()
|
D | DisplayDeviceConfig.java | 2712 private static float[] getLuxLevels(int[] lux) { in getLuxLevels() argument 2714 float[] levels = new float[lux.length + 1]; in getLuxLevels() 2715 for (int i = 0; i < lux.length; i++) { in getLuxLevels() 2716 levels[i + 1] = (float) lux[i]; in getLuxLevels()
|
D | DisplayManagerService.java | 505 float[] lux = getFloatArray(resources.obtainTypedArray( in DisplayManagerService() local 509 mMinimumBrightnessCurve = new Curve(lux, nits); in DisplayManagerService() 510 mMinimumBrightnessSpline = Spline.createSpline(lux, nits); in DisplayManagerService() 1954 float[] lux = curve.first; 1956 for (int i = 0; i < lux.length; i++) { 1957 if (nits[i] < mMinimumBrightnessSpline.interpolate(lux[i])) {
|
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/log/ |
D | ALSProbeTest.java | 181 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/ |
D | BrightnessConfigurationTest.java | 70 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurveMustHaveZeroLuxPoint() local 71 lux[0] = 1f; in testCurveMustHaveZeroLuxPoint() 72 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustHaveZeroLuxPoint() 88 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length + 1); in testCurveMustNotHaveArraysOfDifferentLengths() 89 lux[lux.length - 1] = lux[lux.length - 2] + 1; in testCurveMustNotHaveArraysOfDifferentLengths() 90 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustNotHaveArraysOfDifferentLengths() 103 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurvesMustNotContainNaN() 104 lux[lux.length - 1] = Float.NaN; in testCurvesMustNotContainNaN() 105 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurvesMustNotContainNaN() 201 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testEquals() local [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
D | BrightnessMappingStrategyTest.java | 179 final float lux = (LUX_LEVELS[i - 1] + LUX_LEVELS[i]) / 2; in testSimpleStrategyMappingBetweenControlPoints() local 180 final float backlight = simple.getBrightness(lux) * PowerManager.BRIGHTNESS_ON; in testSimpleStrategyMappingBetweenControlPoints() 193 final float[] lux = { 0f, 1f }; in testSimpleStrategyIgnoresNewConfiguration() local 196 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testSimpleStrategyIgnoresNewConfiguration() 245 final float lux = (LUX_LEVELS[i - 1] + LUX_LEVELS[i]) / 2.0f; in testPhysicalStrategyMappingBetweenControlPoints() local 246 final float brightness = physical.getBrightness(lux); in testPhysicalStrategyMappingBetweenControlPoints() 260 final float[] lux = {0f, 1f}; in testPhysicalStrategyUsesNewConfigurations() local 266 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testPhysicalStrategyUsesNewConfigurations() 322 final float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testNonStrictlyIncreasingLuxLevelsFails() local 323 final int idx = lux.length / 2; in testNonStrictlyIncreasingLuxLevelsFails() [all …]
|
D | AutomaticBrightnessControllerTest.java | 478 final float lux = 100.0f; 479 when(mAmbientBrightnessThresholds.getBrighteningThreshold(lux)) 480 .thenReturn(lux); 481 when(mAmbientBrightnessThresholds.getDarkeningThreshold(lux)) 482 .thenReturn(lux); 483 when(mBrightnessMappingStrategy.getBrightness(eq(lux), eq(null), anyInt())) 487 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux)); 520 int lux = 5000; 522 lux += increment; 524 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, lux)); [all …]
|
D | PersistentDataStoreTest.java | 159 final float[] lux = { 0f, 10f }; in testStoreAndReloadOfDisplayBrightnessConfigurations() local 161 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testStoreAndReloadOfDisplayBrightnessConfigurations() 205 final float[] lux = { 0f, 10f }; in testSetBrightnessConfigurationFailsWithUnstableId() local 207 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testSetBrightnessConfigurationFailsWithUnstableId() 232 final float[] lux = { 0f, 10f }; in testStoreAndReloadOfBrightnessConfigurations() local 234 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testStoreAndReloadOfBrightnessConfigurations() 262 final float[] lux = { 0f, 10f }; in testNullBrightnessConfiguration() local 265 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testNullBrightnessConfiguration()
|
D | DisplayManagerServiceTest.java | 511 float[] lux = minimumBrightnessCurve.getX(); in testTooDarkBrightnessConfigurationThrowException() local 527 new BrightnessConfiguration.Builder(lux, nits).build(); in testTooDarkBrightnessConfigurationThrowException() 546 float[] lux = minimumBrightnessCurve.getX(); in testBrightEnoughBrightnessConfigurationDoesNotThrowException() local 548 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits).build(); in testBrightEnoughBrightnessConfigurationDoesNotThrowException()
|
D | BrightnessTrackerTest.java | 863 private SensorEvent createSensorEvent(float lux) { in createSensorEvent() argument 873 event.values[0] = lux; in createSensorEvent()
|
/frameworks/base/core/java/android/hardware/display/ |
D | BrightnessConfiguration.java | 79 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/proto_logging/stats/ |
D | atoms.proto | 5999 // The ambient light lux when authenticated. 6079 // The ambient light lux when the user enrolled. 21954 // Estimated ambient light, in lux. 21955 optional float lux = 3; field 22037 * expressed as a curve where each point is a pair of ambient light (lux) and the corresponding 22044 // Array of ambient light values (in lux) to define the configuration. 22045 repeated float lux = 1; field 22046 // Array of screen brightness values (in nits) corresponding to the lux
|