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

Commit 5483cea6 authored by Justin Klaassen's avatar Justin Klaassen
Browse files

Remove experimental twilight-based automatic brightness

Bug: 31602449
Test: verified adaptive brightness no longer varies with twilight with
"brightness_use_twilight" set to "1".

Change-Id: I6b5f7310020b2128c2b292414a205b6052270a0a
parent 11bbd9e2
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -230,9 +230,6 @@ public abstract class DisplayManagerInternal {
        public int dozeScreenBrightness;
        public int dozeScreenState;

        // If true, use twilight to affect the brightness.
        public boolean useTwilight;

        public DisplayPowerRequest() {
            policy = POLICY_BRIGHT;
            useProximitySensor = false;
@@ -268,7 +265,6 @@ public abstract class DisplayManagerInternal {
            boostScreenBrightness = other.boostScreenBrightness;
            dozeScreenBrightness = other.dozeScreenBrightness;
            dozeScreenState = other.dozeScreenState;
            useTwilight = other.useTwilight;
        }

        @Override
@@ -289,8 +285,7 @@ public abstract class DisplayManagerInternal {
                    && lowPowerMode == other.lowPowerMode
                    && boostScreenBrightness == other.boostScreenBrightness
                    && dozeScreenBrightness == other.dozeScreenBrightness
                    && dozeScreenState == other.dozeScreenState
                    && useTwilight == other.useTwilight;
                    && dozeScreenState == other.dozeScreenState;
        }

        @Override
@@ -310,8 +305,7 @@ public abstract class DisplayManagerInternal {
                    + ", lowPowerMode=" + lowPowerMode
                    + ", boostScreenBrightness=" + boostScreenBrightness
                    + ", dozeScreenBrightness=" + dozeScreenBrightness
                    + ", dozeScreenState=" + Display.stateToString(dozeScreenState)
                    + ", useTwilight=" + useTwilight;
                    + ", dozeScreenState=" + Display.stateToString(dozeScreenState);
        }

        public static String policyToString(int policy) {
+0 −9
Original line number Diff line number Diff line
@@ -507,15 +507,6 @@ public final class PowerManager {
                com.android.internal.R.integer.config_screenBrightnessForVrSettingDefault);
    }

    /**
     * Returns true if the twilight service should be used to adjust screen brightness
     * policy.  This setting is experimental and disabled by default.
     * @hide
     */
    public static boolean useTwilightAdjustmentFeature() {
        return SystemProperties.getBoolean("persist.power.usetwilightadj", false);
    }

    /**
     * Creates a new wake lock with the specified level and flags.
     * <p>
+0 −6
Original line number Diff line number Diff line
@@ -6720,12 +6720,6 @@ public final class Settings {
         */
        public static final String NIGHT_DISPLAY_CUSTOM_END_TIME = "night_display_custom_end_time";

        /**
         * Whether brightness should automatically adjust based on twilight state.
         * @hide
         */
        public static final String BRIGHTNESS_USE_TWILIGHT = "brightness_use_twilight";

        /**
         * Names of the service components that the current user has explicitly allowed to
         * be a VR mode listener, separated by ':'.
+0 −1
Original line number Diff line number Diff line
@@ -392,7 +392,6 @@ public class SettingsTest {
                 Settings.Secure.BACKUP_PROVISIONED,
                 Settings.Secure.BACKUP_TRANSPORT,
                 Settings.Secure.BLUETOOTH_HCI_LOG,
                 Settings.Secure.BRIGHTNESS_USE_TWILIGHT,  // Candidate for backup?
                 Settings.Secure.CARRIER_APPS_HANDLED,
                 Settings.Secure.COMPLETED_CATEGORY_PREFIX,
                 Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS,
+0 −3
Original line number Diff line number Diff line
@@ -1398,9 +1398,6 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.NIGHT_DISPLAY_CUSTOM_END_TIME,
                SecureSettingsProto.NIGHT_DISPLAY_CUSTOM_END_TIME);
        dumpSetting(s, p,
                Settings.Secure.BRIGHTNESS_USE_TWILIGHT,
                SecureSettingsProto.BRIGHTNESS_USE_TWILIGHT);
        dumpSetting(s, p,
                Settings.Secure.ENABLED_VR_LISTENERS,
                SecureSettingsProto.ENABLED_VR_LISTENERS);
Loading