Home
last modified time | relevance | path

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

/frameworks/base/services/core/java/com/android/server/display/
DBrightnessMappingStrategy.java109 private static float[] getLuxLevels(int[] lux) { in getLuxLevels() argument
111 float[] levels = new float[lux.length + 1]; in getLuxLevels()
112 for (int i = 0; i < lux.length; i++) { in getLuxLevels()
113 levels[i + 1] = (float) lux[i]; in getLuxLevels()
229 public abstract float getBrightness(float lux, String packageName, in getBrightness() argument
242 public float getBrightness(float lux) { in getBrightness() argument
243 return getBrightness(lux, null /* packageName */, ApplicationInfo.CATEGORY_UNDEFINED); in getBrightness()
283 public abstract void addUserDataPoint(float lux, float brightness); in addUserDataPoint() argument
358 float[] luxLevels, float[] brightnessLevels, float lux, float brightness) { in insertControlPoint() argument
359 final int idx = findInsertionPoint(luxLevels, lux); in insertControlPoint()
[all …]
DAutomaticBrightnessController.java493 private void handleLightSensorEvent(long time, float lux) { in handleLightSensorEvent() argument
494 Trace.traceCounter(Trace.TRACE_TAG_POWER, "ALS", (int) lux); in handleLightSensorEvent()
501 applyLightSensorMeasurement(time, lux); in handleLightSensorEvent()
505 private void applyLightSensorMeasurement(long time, float lux) { in applyLightSensorMeasurement() argument
508 mAmbientLightRingBuffer.push(time, lux); in applyLightSensorMeasurement()
511 mLastObservedLux = lux; in applyLightSensorMeasurement()
534 private void setAmbientLux(float lux) { in setAmbientLux() argument
536 Slog.d(TAG, "setAmbientLux(" + lux + ")"); in setAmbientLux()
538 if (lux < 0) { in setAmbientLux()
540 lux = 0; in setAmbientLux()
[all …]
DDisplayManagerService.java342 float[] lux = getFloatArray(resources.obtainTypedArray( in DisplayManagerService() local
346 mMinimumBrightnessCurve = new Curve(lux, nits); in DisplayManagerService()
347 mMinimumBrightnessSpline = Spline.createSpline(lux, nits); in DisplayManagerService()
1210 float[] lux = curve.first; in isBrightnessConfigurationTooDark() local
1212 for (int i = 0; i < lux.length; i++) { in isBrightnessConfigurationTooDark()
1213 if (nits[i] < mMinimumBrightnessSpline.interpolate(lux[i])) { in isBrightnessConfigurationTooDark()
DBrightnessTracker.java367 luxValues[pos] = reading.lux; in handleBrightnessChanged()
849 public float lux; field in BrightnessTracker.LightData
879 data.lux = event.values[0]; in recordSensorEvent()
DDisplayModeDirector.java1280 private boolean isInsideZone(int brightness, float lux) { in isInsideZone() argument
/frameworks/base/core/tests/coretests/src/android/hardware/display/
DBrightnessConfigurationTest.java72 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurveMustHaveZeroLuxPoint() local
73 lux[0] = 1f; in testCurveMustHaveZeroLuxPoint()
74 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustHaveZeroLuxPoint()
90 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length + 1); in testCurveMustNotHaveArraysOfDifferentLengths()
91 lux[lux.length - 1] = lux[lux.length - 2] + 1; in testCurveMustNotHaveArraysOfDifferentLengths()
92 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurveMustNotHaveArraysOfDifferentLengths()
105 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testCurvesMustNotContainNaN()
106 lux[lux.length - 1] = Float.NaN; in testCurvesMustNotContainNaN()
107 new BrightnessConfiguration.Builder(lux, NITS_LEVELS); in testCurvesMustNotContainNaN()
203 float[] lux = Arrays.copyOf(LUX_LEVELS, LUX_LEVELS.length); in testEquals() local
[all …]
/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.java338 float[] lux = minimumBrightnessCurve.getX(); in testTooDarkBrightnessConfigurationThrowException() local
354 new BrightnessConfiguration.Builder(lux, nits).build(); in testTooDarkBrightnessConfigurationThrowException()
373 float[] lux = minimumBrightnessCurve.getX(); in testBrightEnoughBrightnessConfigurationDoesNotThrowException() local
375 BrightnessConfiguration config = new BrightnessConfiguration.Builder(lux, nits).build(); in testBrightEnoughBrightnessConfigurationDoesNotThrowException()
DBrightnessTrackerTest.java772 private SensorEvent createSensorEvent(float lux) { in createSensorEvent() argument
782 event.values[0] = lux; in createSensorEvent()
/frameworks/base/core/java/android/hardware/display/
DBrightnessConfiguration.java81 private BrightnessConfiguration(float[] lux, float[] nits, in BrightnessConfiguration() argument
88 mLux = lux; in BrightnessConfiguration()
305 float[] lux = in.createFloatArray();
307 Builder builder = new Builder(lux, nits);
433 final float lux = loadFloatFromXml(parser, ATTR_LUX); in loadFromXml() local
435 luxList.add(lux); in loadFromXml()
470 float[] lux = new float[n]; in loadFromXml() local
473 lux[i] = luxList.get(i); in loadFromXml()
476 final BrightnessConfiguration.Builder builder = new BrightnessConfiguration.Builder(lux, in loadFromXml()
543 public Builder(float[] lux, float[] nits) { in Builder() argument
[all …]