Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5239,7 +5239,7 @@ package android.app { field public static java.lang.String ACTION_EXIT_DESK_MODE; field public static final int DISABLE_CAR_MODE_GO_HOME = 1; // 0x1 field public static final int ENABLE_CAR_MODE_GO_CAR_HOME = 1; // 0x1 field public static final int ENABLE_CAR_MODE_NO_WAKE_LOCK = 2; // 0x2 field public static final int ENABLE_CAR_MODE_ALLOW_SLEEP = 2; // 0x2 field public static final int MODE_NIGHT_AUTO = 0; // 0x0 field public static final int MODE_NIGHT_NO = 1; // 0x1 field public static final int MODE_NIGHT_YES = 2; // 0x2 core/java/android/app/UiModeManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -125,15 +125,15 @@ public class UiModeManager { public static final int ENABLE_CAR_MODE_GO_CAR_HOME = 0x0001; /** * Flag for use with {@link #enableCarMode(int)}: do not hold full wake lock * while in car mode. By default, when this flag is not set, the system may hold * a full wake lock to keep the screen turned on while in car mode. * Setting this flag disables such behavior and the screen may be turned off if * there is no other user activity and no other full wake lock held. * Flag for use with {@link #enableCarMode(int)}: allow sleep mode while in car mode. * By default, when this flag is not set, the system may hold a full wake lock to keep the * screen turned on and prevent the system from entering sleep mode while in car mode. * Setting this flag disables such behavior and the system may enter sleep mode * if there is no other user activity and no other wake lock held. * Setting this flag can be relevant for a car dock application that does not require the * screen kept on. */ public static final int ENABLE_CAR_MODE_NO_WAKE_LOCK = 0x0002; public static final int ENABLE_CAR_MODE_ALLOW_SLEEP = 0x0002; /** * Force device into car mode, like it had been placed in the car dock. Loading services/core/java/com/android/server/UiModeManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -479,7 +479,7 @@ final class UiModeManagerService extends SystemService { // keep screen on when charging and in car mode boolean keepScreenOn = mCharging && ((mCarModeEnabled && mCarModeKeepsScreenOn && (mCarModeEnableFlags & UiModeManager.ENABLE_CAR_MODE_NO_WAKE_LOCK) == 0) || (mCarModeEnableFlags & UiModeManager.ENABLE_CAR_MODE_ALLOW_SLEEP) == 0) || (mCurUiMode == Configuration.UI_MODE_TYPE_DESK && mDeskModeKeepsScreenOn)); if (keepScreenOn != mWakeLock.isHeld()) { if (keepScreenOn) { Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5239,7 +5239,7 @@ package android.app { field public static java.lang.String ACTION_EXIT_DESK_MODE; field public static final int DISABLE_CAR_MODE_GO_HOME = 1; // 0x1 field public static final int ENABLE_CAR_MODE_GO_CAR_HOME = 1; // 0x1 field public static final int ENABLE_CAR_MODE_NO_WAKE_LOCK = 2; // 0x2 field public static final int ENABLE_CAR_MODE_ALLOW_SLEEP = 2; // 0x2 field public static final int MODE_NIGHT_AUTO = 0; // 0x0 field public static final int MODE_NIGHT_NO = 1; // 0x1 field public static final int MODE_NIGHT_YES = 2; // 0x2
core/java/android/app/UiModeManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -125,15 +125,15 @@ public class UiModeManager { public static final int ENABLE_CAR_MODE_GO_CAR_HOME = 0x0001; /** * Flag for use with {@link #enableCarMode(int)}: do not hold full wake lock * while in car mode. By default, when this flag is not set, the system may hold * a full wake lock to keep the screen turned on while in car mode. * Setting this flag disables such behavior and the screen may be turned off if * there is no other user activity and no other full wake lock held. * Flag for use with {@link #enableCarMode(int)}: allow sleep mode while in car mode. * By default, when this flag is not set, the system may hold a full wake lock to keep the * screen turned on and prevent the system from entering sleep mode while in car mode. * Setting this flag disables such behavior and the system may enter sleep mode * if there is no other user activity and no other wake lock held. * Setting this flag can be relevant for a car dock application that does not require the * screen kept on. */ public static final int ENABLE_CAR_MODE_NO_WAKE_LOCK = 0x0002; public static final int ENABLE_CAR_MODE_ALLOW_SLEEP = 0x0002; /** * Force device into car mode, like it had been placed in the car dock. Loading
services/core/java/com/android/server/UiModeManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -479,7 +479,7 @@ final class UiModeManagerService extends SystemService { // keep screen on when charging and in car mode boolean keepScreenOn = mCharging && ((mCarModeEnabled && mCarModeKeepsScreenOn && (mCarModeEnableFlags & UiModeManager.ENABLE_CAR_MODE_NO_WAKE_LOCK) == 0) || (mCarModeEnableFlags & UiModeManager.ENABLE_CAR_MODE_ALLOW_SLEEP) == 0) || (mCurUiMode == Configuration.UI_MODE_TYPE_DESK && mDeskModeKeepsScreenOn)); if (keepScreenOn != mWakeLock.isHeld()) { if (keepScreenOn) { Loading