Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15dab3c3 authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Revert "frameworks: display: Added automatic brightness configs"

This reverts commit 99854359.

Change-Id: I01196c4287d109893734b02e82d600d2c27ab3cf
parent a05d81a0
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -296,10 +296,6 @@
    <java-symbol type="string" name="usb_ext_media_unmountable_notification_message" />
    <java-symbol type="string" name="usb_ext_media_unmountable_notification_title" />

    <!-- Automatic display brightness settings -->
    <java-symbol type="integer" name="config_brighteningLightDebounce" />
    <java-symbol type="integer" name="config_darkeningLightDebounce" />

    <!-- LiveDisplay -->
    <java-symbol type="string" name="live_display_title" />
    <java-symbol type="string" name="live_display_hint" />
+0 −4
Original line number Diff line number Diff line
@@ -971,10 +971,6 @@
    <integer-array name="config_autoBrightnessLevels">
    </integer-array>

    <!-- The debounce time value for automatic display brightness adjustment -->
    <integer name="config_brighteningLightDebounce">4000</integer>
    <integer name="config_darkeningLightDebounce">8000</integer>

    <!-- Array of output values for LCD backlight corresponding to the LUX values
         in the config_autoBrightnessLevels array.  This array should have size one greater
         than the size of the config_autoBrightnessLevels array.
+4 −10
Original line number Diff line number Diff line
@@ -65,8 +65,8 @@ class AutomaticBrightnessController {
    // when adapting to brighter or darker environments.  This parameter controls how quickly
    // brightness changes occur in response to an observed change in light level that exceeds the
    // hysteresis threshold.
    private final long mBrighteningLightDebounceConfig;
    private final long mDarkeningLightDebounceConfig;
    private static final long BRIGHTENING_LIGHT_DEBOUNCE = 4000;
    private static final long DARKENING_LIGHT_DEBOUNCE = 8000;

    // Hysteresis constraints for brightening or darkening.
    // The recent lux must have changed by at least this fraction relative to the
@@ -185,7 +185,6 @@ class AutomaticBrightnessController {
            SensorManager sensorManager, Spline autoBrightnessSpline, int lightSensorWarmUpTime,
            int brightnessMin, int brightnessMax, float dozeScaleFactor,
            LiveDisplayController ldc) {
        final Resources resources = context.getResources();
        mContext = context;
        mCallbacks = callbacks;
        mTwilight = LocalServices.getService(TwilightManager.class);
@@ -197,11 +196,6 @@ class AutomaticBrightnessController {
        mDozeScaleFactor = dozeScaleFactor;
        mLiveDisplay = ldc;

        mBrighteningLightDebounceConfig = resources.getInteger(
                com.android.internal.R.integer.config_brighteningLightDebounce);
        mDarkeningLightDebounceConfig = resources.getInteger(
                com.android.internal.R.integer.config_darkeningLightDebounce);

        mHandler = new AutomaticBrightnessHandler(looper);
        mAmbientLightRingBuffer = new AmbientLightRingBuffer();

@@ -363,7 +357,7 @@ class AutomaticBrightnessController {
            }
            earliestValidTime = mAmbientLightRingBuffer.getTime(i);
        }
        return earliestValidTime + mBrighteningLightDebounceConfig;
        return earliestValidTime + BRIGHTENING_LIGHT_DEBOUNCE;
    }

    private long nextAmbientLightDarkeningTransition(long time) {
@@ -375,7 +369,7 @@ class AutomaticBrightnessController {
            }
            earliestValidTime = mAmbientLightRingBuffer.getTime(i);
        }
        return earliestValidTime + mDarkeningLightDebounceConfig;
        return earliestValidTime + DARKENING_LIGHT_DEBOUNCE;
    }

    private void updateAmbientLux() {