Home
last modified time | relevance | path

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

/frameworks/base/core/tests/coretests/src/android/hardware/display/
DBrightnessConfigurationTest.java62 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurveMustHaveZeroLuxPoint() local
63 lux[0] = 1f; in testCurveMustHaveZeroLuxPoint()
64 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustHaveZeroLuxPoint()
80 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length + 1); in testCurveMustNotHaveArraysOfDifferentLengths()
81 lux[lux.length - 1] = lux[lux.length - 2] + 1; in testCurveMustNotHaveArraysOfDifferentLengths()
82 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustNotHaveArraysOfDifferentLengths()
95 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurvesMustNotContainNaN()
96 lux[lux.length - 1] = Float.NaN; in testCurvesMustNotContainNaN()
97 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurvesMustNotContainNaN()
133 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testEquals() local
[all …]
/frameworks/base/services/core/java/com/android/server/display/
DBrightnessMappingStrategy.java95 private static float[] getLuxLevels(int[] lux) { in getLuxLevels() argument
97 float[] levels = new float[lux.length + 1]; in getLuxLevels()
98 for (int i = 0; i < lux.length; i++) { in getLuxLevels()
99 levels[i + 1] = (float) lux[i]; in getLuxLevels()
203 public abstract float getBrightness(float lux, String packageName, in getBrightness() argument
216 public float getBrightness(float lux) { in getBrightness() argument
217 return getBrightness(lux, null /* packageName */, ApplicationInfo.CATEGORY_UNDEFINED); in getBrightness()
257 public abstract void addUserDataPoint(float lux, float brightness); in addUserDataPoint() argument
286 float[] luxLevels, float[] brightnessLevels, float lux, float brightness) { in insertControlPoint() argument
287 final int idx = findInsertionPoint(luxLevels, lux); in insertControlPoint()
[all …]
DAutomaticBrightnessController.java500 private void handleLightSensorEvent(long time, float lux) { in handleLightSensorEvent() argument
501 Trace.traceCounter(Trace.TRACE_TAG_POWER, "ALS", (int) lux); in handleLightSensorEvent()
508 applyLightSensorMeasurement(time, lux); in handleLightSensorEvent()
512 private void applyLightSensorMeasurement(long time, float lux) { in applyLightSensorMeasurement() argument
515 mAmbientLightRingBuffer.push(time, lux); in applyLightSensorMeasurement()
518 mLastObservedLux = lux; in applyLightSensorMeasurement()
541 private void setAmbientLux(float lux) { in setAmbientLux() argument
543 Slog.d(TAG, "setAmbientLux(" + lux + ")"); in setAmbientLux()
545 if (lux < 0) { in setAmbientLux()
547 lux = 0; in setAmbientLux()
[all …]
DDisplayManagerService.java326 float[] lux = getFloatArray(resources.obtainTypedArray( in DisplayManagerService() local
330 mMinimumBrightnessCurve = new Curve(lux, nits); in DisplayManagerService()
331 mMinimumBrightnessSpline = Spline.createSpline(lux, nits); in DisplayManagerService()
1133 float[] lux = curve.first; in isBrightnessConfigurationTooDark() local
1135 for (int i = 0; i < lux.length; i++) { in isBrightnessConfigurationTooDark()
1136 if (nits[i] < mMinimumBrightnessSpline.interpolate(lux[i])) { in isBrightnessConfigurationTooDark()
DBrightnessTracker.java358 luxValues[pos] = reading.lux; in handleBrightnessChanged()
839 public float lux; field in BrightnessTracker.LightData
869 data.lux = event.values[0]; in recordSensorEvent()
DDisplayModeDirector.java1009 private boolean isInsideZone(int brightness, float lux) { in isInsideZone() argument
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DBrightnessMappingStrategyTest.java138 final float lux = (LUX_LEVELS[i - 1] + LUX_LEVELS[i]) / 2; in testSimpleStrategyMappingBetweenControlPoints() local
139 final float backlight = simple.getBrightness(lux) * PowerManager.BRIGHTNESS_ON; in testSimpleStrategyMappingBetweenControlPoints()
152 final float[] lux = { 0f, 1f }; in testSimpleStrategyIgnoresNewConfiguration() local
155 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testSimpleStrategyIgnoresNewConfiguration()
196 final float lux = (LUX_LEVELS[i - 1] + LUX_LEVELS[i]) / 2; in testPhysicalStrategyMappingBetweenControlPoints() local
197 final float backlight = physical.getBrightness(lux) * PowerManager.BRIGHTNESS_ON; in testPhysicalStrategyMappingBetweenControlPoints()
210 final float[] lux = { 0f, 1f }; in testPhysicalStrategyUsesNewConfigurations() local
216 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testPhysicalStrategyUsesNewConfigurations()
239 final int[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testNonStrictlyIncreasingLuxLevelsFails() local
240 final int idx = lux.length / 2; in testNonStrictlyIncreasingLuxLevelsFails()
[all …]
DPersistentDataStoreTest.java148 final float[] lux = { 0f, 10f }; in testStoreAndReloadOfBrightnessConfigurations() local
150 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testStoreAndReloadOfBrightnessConfigurations()
174 final float[] lux = { 0f, 10f }; in testNullBrightnessConfiguration() local
176 final BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits) in testNullBrightnessConfiguration()
DTestUtils.java29 public static SensorEvent createSensorEvent(Sensor sensor, int lux) throws Exception { in createSensorEvent() argument
35 event.values[0] = lux; in createSensorEvent()
DDisplayManagerServiceTest.java324 float[] lux = minimumBrightnessCurve.getX(); in testTooDarkBrightnessConfigurationThrowException() local
340 new BrightnessConfiguration.Builder(lux, nits).build(); in testTooDarkBrightnessConfigurationThrowException()
359 float[] lux = minimumBrightnessCurve.getX(); in testBrightEnoughBrightnessConfigurationDoesNotThrowException() local
361 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits).build(); in testBrightEnoughBrightnessConfigurationDoesNotThrowException()
DBrightnessTrackerTest.java749 private SensorEvent createSensorEvent(float lux) { in createSensorEvent() argument
759 event.values[0] = lux; in createSensorEvent()
/frameworks/base/core/java/android/hardware/display/
DBrightnessConfiguration.java64 private BrightnessConfiguration(float[] lux, float[] nits, in BrightnessConfiguration() argument
67 mLux = lux; in BrightnessConfiguration()
205 float[] lux = in.createFloatArray();
207 Builder builder = new Builder(lux, nits);
305 final float lux = loadFloatFromXml(parser, ATTR_LUX); in loadFromXml() local
307 luxList.add(lux); in loadFromXml()
334 float[] lux = new float[n]; in loadFromXml() local
337 lux[i] = luxList.get(i); in loadFromXml()
340 final BrightnessConfiguration.Builder builder = new BrightnessConfiguration.Builder(lux, in loadFromXml()
389 public Builder(float[] lux, float[] nits) { in Builder() argument
[all …]