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

Commit 1edf63ef authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Enable auto-brightness adjustment feature with system prop." into jb-mr1-dev

parents b0d10aa9 631938f2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -330,6 +330,15 @@ public final class PowerManager {
                com.android.internal.R.integer.config_screenBrightnessSettingDefault);
    }

    /**
     * Returns true if the screen auto-brightness adjustment setting should
     * be available in the UI.  This setting is experimental and disabled by default.
     * @hide
     */
    public static boolean useScreenAutoBrightnessAdjustmentFeature() {
        return SystemProperties.getBoolean("persist.power.useautobrightadj", false);
    }

    /**
     * Creates a new wake lock with the specified level and flags.
     * <p>
+2 −1
Original line number Diff line number Diff line
@@ -83,7 +83,8 @@ final class DisplayPowerController {
    private static final boolean USE_ELECTRON_BEAM_ON_ANIMATION = false;

    // If true, enables the use of the screen auto-brightness adjustment setting.
    private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT = false;
    private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT =
            PowerManager.useScreenAutoBrightnessAdjustmentFeature();

    // The maximum range of gamma adjustment possible using the screen
    // auto-brightness adjustment setting.