Loading core/res/res/values/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,8 @@ <bool name="config_allowTheaterModeWakeFromDock">false</bool> <!-- If this is true, allow wake from theater mode from window layout flag. --> <bool name="config_allowTheaterModeWakeFromWindowLayout">false</bool> <!-- If this is true, go to sleep when theater mode is enabled from button press --> <bool name="config_goToSleepOnButtonPressTheaterMode">true</bool> <!-- Auto-rotation behavior --> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1584,6 +1584,7 @@ <java-symbol type="bool" name="config_allowTheaterModeWakeFromLidSwitch" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" /> <java-symbol type="bool" name="config_goToSleepOnButtonPressTheaterMode" /> <java-symbol type="bool" name="config_wifi_background_scan_support" /> <java-symbol type="bool" name="config_wifi_dual_band_support" /> <java-symbol type="bool" name="config_wimaxEnabled" /> Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −1 Original line number Diff line number Diff line Loading @@ -527,6 +527,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean mAllowTheaterModeWakeFromLidSwitch; private boolean mAllowTheaterModeWakeFromWakeGesture; // Whether to go to sleep entering theater mode from power button private boolean mGoToSleepOnButtonPressTheaterMode; // Screenshot trigger states // Time to volume and power must be pressed within this interval of each other. private static final long SCREENSHOT_CHORD_DEBOUNCE_DELAY_MILLIS = 150; Loading Loading @@ -984,7 +987,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { Slog.i(TAG, "Toggling theater mode on."); Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.THEATER_MODE_ON, 1); if (interactive) { if (mGoToSleepOnButtonPressTheaterMode && interactive) { mPowerManager.goToSleep(eventTime, PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON, 0); } Loading Loading @@ -1236,6 +1240,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { mAllowTheaterModeWakeFromWakeGesture = mContext.getResources().getBoolean( com.android.internal.R.bool.config_allowTheaterModeWakeFromGesture); mGoToSleepOnButtonPressTheaterMode = mContext.getResources().getBoolean( com.android.internal.R.bool.config_goToSleepOnButtonPressTheaterMode); mShortPressOnPowerBehavior = mContext.getResources().getInteger( com.android.internal.R.integer.config_shortPressOnPowerBehavior); mLongPressOnPowerBehavior = mContext.getResources().getInteger( Loading Loading
core/res/res/values/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,8 @@ <bool name="config_allowTheaterModeWakeFromDock">false</bool> <!-- If this is true, allow wake from theater mode from window layout flag. --> <bool name="config_allowTheaterModeWakeFromWindowLayout">false</bool> <!-- If this is true, go to sleep when theater mode is enabled from button press --> <bool name="config_goToSleepOnButtonPressTheaterMode">true</bool> <!-- Auto-rotation behavior --> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1584,6 +1584,7 @@ <java-symbol type="bool" name="config_allowTheaterModeWakeFromLidSwitch" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" /> <java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" /> <java-symbol type="bool" name="config_goToSleepOnButtonPressTheaterMode" /> <java-symbol type="bool" name="config_wifi_background_scan_support" /> <java-symbol type="bool" name="config_wifi_dual_band_support" /> <java-symbol type="bool" name="config_wimaxEnabled" /> Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −1 Original line number Diff line number Diff line Loading @@ -527,6 +527,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean mAllowTheaterModeWakeFromLidSwitch; private boolean mAllowTheaterModeWakeFromWakeGesture; // Whether to go to sleep entering theater mode from power button private boolean mGoToSleepOnButtonPressTheaterMode; // Screenshot trigger states // Time to volume and power must be pressed within this interval of each other. private static final long SCREENSHOT_CHORD_DEBOUNCE_DELAY_MILLIS = 150; Loading Loading @@ -984,7 +987,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { Slog.i(TAG, "Toggling theater mode on."); Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.THEATER_MODE_ON, 1); if (interactive) { if (mGoToSleepOnButtonPressTheaterMode && interactive) { mPowerManager.goToSleep(eventTime, PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON, 0); } Loading Loading @@ -1236,6 +1240,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { mAllowTheaterModeWakeFromWakeGesture = mContext.getResources().getBoolean( com.android.internal.R.bool.config_allowTheaterModeWakeFromGesture); mGoToSleepOnButtonPressTheaterMode = mContext.getResources().getBoolean( com.android.internal.R.bool.config_goToSleepOnButtonPressTheaterMode); mShortPressOnPowerBehavior = mContext.getResources().getInteger( com.android.internal.R.integer.config_shortPressOnPowerBehavior); mLongPressOnPowerBehavior = mContext.getResources().getInteger( Loading