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

Commit 7e96654f authored by Ian Pedowitz's avatar Ian Pedowitz
Browse files

Revert "Add Brightness setting for VR Mode."

This reverts commit c7e853f5.

Bug: 33895226
Bug: 30984614
Change-Id: Icca320e02651b7dd7b8db84ab414f41edee32760
parent c7e853f5
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -167,8 +167,6 @@ public abstract class DisplayManagerInternal {
        public static final int POLICY_DIM = 2;
        // Policy: Make the screen bright as usual.
        public static final int POLICY_BRIGHT = 3;
        // Policy: Keep the screen and display optimized for VR mode.
        public static final int POLICY_VR = 4;

        // The basic overall policy to apply: off, doze, dim or bright.
        public int policy;
@@ -235,10 +233,6 @@ public abstract class DisplayManagerInternal {
            return policy == POLICY_BRIGHT || policy == POLICY_DIM;
        }

        public boolean isVr() {
            return policy == POLICY_VR;
        }

        public void copyFrom(DisplayPowerRequest other) {
            policy = other.policy;
            useProximitySensor = other.useProximitySensor;
@@ -307,8 +301,6 @@ public abstract class DisplayManagerInternal {
                    return "DIM";
                case POLICY_BRIGHT:
                    return "BRIGHT";
                case POLICY_VR:
                    return "VR";
                default:
                    return Integer.toString(policy);
            }
+11 −40
Original line number Diff line number Diff line
@@ -478,35 +478,6 @@ public final class PowerManager {
                com.android.internal.R.integer.config_screenBrightnessSettingDefault);
    }

    /**
     * Gets the minimum supported screen brightness setting for VR Mode.
     * @hide
     */
    public int getMinimumScreenBrightnessForVrSetting() {
        return mContext.getResources().getInteger(
                com.android.internal.R.integer.config_screenBrightnessForVrSettingMinimum);
    }

    /**
     * Gets the maximum supported screen brightness setting for VR Mode.
     * The screen may be allowed to become dimmer than this value but
     * this is the maximum value that can be set by the user.
     * @hide
     */
    public int getMaximumScreenBrightnessForVrSetting() {
        return mContext.getResources().getInteger(
                com.android.internal.R.integer.config_screenBrightnessForVrSettingMaximum);
    }

    /**
     * Gets the default screen brightness for VR setting.
     * @hide
     */
    public int getDefaultScreenBrightnessForVrSetting() {
        return mContext.getResources().getInteger(
                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.
+0 −10
Original line number Diff line number Diff line
@@ -2888,15 +2888,6 @@ public final class Settings {
        private static final Validator SCREEN_BRIGHTNESS_VALIDATOR =
                new InclusiveIntegerRangeValidator(0, 255);

        /**
         * The screen backlight brightness between 0 and 255.
         * @hide
         */
        public static final String SCREEN_BRIGHTNESS_FOR_VR = "screen_brightness_for_vr";

        private static final Validator SCREEN_BRIGHTNESS_FOR_VR_VALIDATOR =
                new InclusiveIntegerRangeValidator(0, 255);

        /**
         * Control whether to enable automatic brightness mode.
         */
@@ -3891,7 +3882,6 @@ public final class Settings {
            VALIDATORS.put(DIM_SCREEN, DIM_SCREEN_VALIDATOR);
            VALIDATORS.put(SCREEN_OFF_TIMEOUT, SCREEN_OFF_TIMEOUT_VALIDATOR);
            VALIDATORS.put(SCREEN_BRIGHTNESS, SCREEN_BRIGHTNESS_VALIDATOR);
            VALIDATORS.put(SCREEN_BRIGHTNESS_FOR_VR, SCREEN_BRIGHTNESS_FOR_VR_VALIDATOR);
            VALIDATORS.put(SCREEN_BRIGHTNESS_MODE, SCREEN_BRIGHTNESS_MODE_VALIDATOR);
            VALIDATORS.put(MODE_RINGER_STREAMS_AFFECTED, MODE_RINGER_STREAMS_AFFECTED_VALIDATOR);
            VALIDATORS.put(MUTE_STREAMS_AFFECTED, MUTE_STREAMS_AFFECTED_VALIDATOR);
+1 −13
Original line number Diff line number Diff line
@@ -282,15 +282,6 @@ public final class Display {
     */
    public static final int STATE_DOZE_SUSPEND = 4;

    /**
     * Display state: The display is on and optimized for VR mode.
     *
     * @see #getState
     * @see android.os.PowerManager#isInteractive
     * @hide
     */
    public static final int STATE_VR = 5;

    /* The color mode constants defined below must be kept in sync with the ones in
     * system/graphics.h */

@@ -875,8 +866,7 @@ public final class Display {
     * Gets the state of the display, such as whether it is on or off.
     *
     * @return The state of the display: one of {@link #STATE_OFF}, {@link #STATE_ON},
     * {@link #STATE_DOZE}, {@link #STATE_DOZE_SUSPEND}, or
     * {@link #STATE_UNKNOWN}.
     * {@link #STATE_DOZE}, {@link #STATE_DOZE_SUSPEND}, or {@link #STATE_UNKNOWN}.
     */
    public int getState() {
        synchronized (this) {
@@ -992,8 +982,6 @@ public final class Display {
                return "DOZE";
            case STATE_DOZE_SUSPEND:
                return "DOZE_SUSPEND";
            case STATE_VR:
                return "VR";
            default:
                return Integer.toString(state);
        }
+0 −10
Original line number Diff line number Diff line
@@ -1049,16 +1049,6 @@
         Must be in the range specified by minimum and maximum. -->
    <integer name="config_screenBrightnessSettingDefault">102</integer>

    <!-- Default screen brightness for VR setting. -->
    <integer name="config_screenBrightnessForVrSettingDefault">86</integer>

    <!-- Minimum screen brightness setting allowed for VR. Device panels start increasing pulse
         width as brightness decreases below this theshold. -->
    <integer name="config_screenBrightnessForVrSettingMinimum">79</integer>

    <!-- Maximum screen brightness setting allowed for VR. -->
    <integer name="config_screenBrightnessForVrSettingMaximum">255</integer>

    <!-- Screen brightness used to dim the screen while dozing in a very low power state.
         May be less than the minimum allowed brightness setting
         that can be set by the user. -->
Loading