DO NOT MERGE Revert "Add Brightness setting for VR Mode."

am: 966045d070

Change-Id: Ib1be78a47f5947f4fcc6eabc2f6af76523690ed9
This commit is contained in:
Selim Cinek
2016-12-27 19:22:04 +00:00
committed by android-build-merger
14 changed files with 83 additions and 307 deletions

View File

@@ -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);
}

View File

@@ -49,23 +49,23 @@ import android.util.Log;
* <i>These levels are mutually exclusive - you may only specify one of them.</i>
*
* <table>
* <tr><th>Flag Value</th>
* <tr><th>Flag Value</th>
* <th>CPU</th> <th>Screen</th> <th>Keyboard</th></tr>
*
* <tr><td>{@link #PARTIAL_WAKE_LOCK}</td>
* <td>On*</td> <td>Off</td> <td>Off</td>
* <td>On*</td> <td>Off</td> <td>Off</td>
* </tr>
*
*
* <tr><td>{@link #SCREEN_DIM_WAKE_LOCK}</td>
* <td>On</td> <td>Dim</td> <td>Off</td>
* <td>On</td> <td>Dim</td> <td>Off</td>
* </tr>
*
* <tr><td>{@link #SCREEN_BRIGHT_WAKE_LOCK}</td>
* <td>On</td> <td>Bright</td> <td>Off</td>
* <td>On</td> <td>Bright</td> <td>Off</td>
* </tr>
*
*
* <tr><td>{@link #FULL_WAKE_LOCK}</td>
* <td>On</td> <td>Bright</td> <td>Bright</td>
* <td>On</td> <td>Bright</td> <td>Bright</td>
* </tr>
* </table>
* </p><p>
@@ -85,13 +85,13 @@ import android.util.Log;
* the illumination to remain on once it turns on (e.g. from user activity). This flag
* will force the screen and/or keyboard to turn on immediately, when the WakeLock is
* acquired. A typical use would be for notifications which are important for the user to
* see immediately.</td>
* see immediately.</td>
* </tr>
*
*
* <tr><td>{@link #ON_AFTER_RELEASE}</td>
* <td>If this flag is set, the user activity timer will be reset when the WakeLock is
* released, causing the illumination to remain on a bit longer. This can be used to
* reduce flicker if you are cycling between wake lock conditions.</td>
* released, causing the illumination to remain on a bit longer. This can be used to
* reduce flicker if you are cycling between wake lock conditions.</td>
* </tr>
* </table>
* <p>
@@ -472,35 +472,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.

View File

@@ -2772,15 +2772,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.
*/
@@ -3775,7 +3766,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);

View File

@@ -284,15 +284,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 */
@@ -877,8 +868,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) {
@@ -994,8 +984,6 @@ public final class Display {
return "DOZE";
case STATE_DOZE_SUSPEND:
return "DOZE_SUSPEND";
case STATE_VR:
return "VR";
default:
return Integer.toString(state);
}