Loading core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -2530,6 +2530,12 @@ public final class Settings { */ public static final String MENU_UNLOCK_SCREEN = "menu_unlock_screen"; /** * Whether to unlock the screen with the home key. The value is boolean (1 or 0). * @hide */ public static final String HOME_UNLOCK_SCREEN = "home_unlock_screen"; /** * Whether to wake the screen with the volume keys, the value is boolean. * @hide Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,9 @@ <!-- Allow the menu hard key to be disabled in LockScreen on some devices --> <bool name="config_disableMenuKeyInLockScreen">false</bool> <!-- Disable the home key unlock setting --> <bool name="config_disableHomeUnlockSetting">true</bool> <!-- Don't show lock screen before unlock screen (PIN/pattern/password) --> <bool name="config_enableLockBeforeUnlockScreen">false</bool> Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1216,6 +1216,7 @@ <java-symbol type="bool" name="config_carDockEnablesAccelerometer" /> <java-symbol type="bool" name="config_deskDockEnablesAccelerometer" /> <java-symbol type="bool" name="config_disableMenuKeyInLockScreen" /> <java-symbol type="bool" name="config_disableHomeUnlockSetting" /> <java-symbol type="bool" name="config_enableLockBeforeUnlockScreen" /> <java-symbol type="bool" name="config_enableLockScreenRotation" /> <java-symbol type="bool" name="config_lidControlsSleep" /> Loading policy/src/com/android/internal/policy/impl/LockScreen.java +4 −1 Original line number Diff line number Diff line Loading @@ -587,6 +587,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen { return !configDisabled || isTestHarness || fileOverride || menuOverride; } boolean mHomeUnlockScreen = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.HOME_UNLOCK_SCREEN, 0) == 1); /** * @param context Used to setup the view. * @param configuration The current configuration. Used to use when selecting layout, etc. Loading Loading @@ -733,7 +735,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen { @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_MENU && mEnableMenuKeyInLockScreen) { if ((keyCode == KeyEvent.KEYCODE_MENU && mEnableMenuKeyInLockScreen) || (keyCode == KeyEvent.KEYCODE_HOME && mHomeUnlockScreen)) { mCallback.goToUnlockScreen(); } return false; Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -552,6 +552,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { // Behavior of ENDCALL Button. (See Settings.System.END_BUTTON_BEHAVIOR.) int mEndcallBehavior; // Behavior of home unlock boolean mHomeUnlockScreen; // Behavior of POWER button while in-call and screen on. // (See Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR.) int mIncallPowerBehavior; Loading Loading @@ -643,6 +646,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { Settings.System.VOLBTN_MUSIC_CONTROLS), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.ACCELEROMETER_ROTATION), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.HOME_UNLOCK_SCREEN), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.USER_ROTATION), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Loading Loading @@ -1364,6 +1369,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { Settings.System.VOLUME_WAKE_SCREEN, 0) == 1); mVolBtnMusicControls = (Settings.System.getInt(resolver, Settings.System.VOLBTN_MUSIC_CONTROLS, 1) == 1); mHomeUnlockScreen = (Settings.System.getInt(resolver, Settings.System.HOME_UNLOCK_SCREEN, 0) == 1); boolean keyRebindingEnabled = Settings.System.getInt(resolver, Settings.System.HARDWARE_KEY_REBINDING, 0) == 1; Loading Loading
core/java/android/provider/Settings.java +6 −0 Original line number Diff line number Diff line Loading @@ -2530,6 +2530,12 @@ public final class Settings { */ public static final String MENU_UNLOCK_SCREEN = "menu_unlock_screen"; /** * Whether to unlock the screen with the home key. The value is boolean (1 or 0). * @hide */ public static final String HOME_UNLOCK_SCREEN = "home_unlock_screen"; /** * Whether to wake the screen with the volume keys, the value is boolean. * @hide Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -516,6 +516,9 @@ <!-- Allow the menu hard key to be disabled in LockScreen on some devices --> <bool name="config_disableMenuKeyInLockScreen">false</bool> <!-- Disable the home key unlock setting --> <bool name="config_disableHomeUnlockSetting">true</bool> <!-- Don't show lock screen before unlock screen (PIN/pattern/password) --> <bool name="config_enableLockBeforeUnlockScreen">false</bool> Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1216,6 +1216,7 @@ <java-symbol type="bool" name="config_carDockEnablesAccelerometer" /> <java-symbol type="bool" name="config_deskDockEnablesAccelerometer" /> <java-symbol type="bool" name="config_disableMenuKeyInLockScreen" /> <java-symbol type="bool" name="config_disableHomeUnlockSetting" /> <java-symbol type="bool" name="config_enableLockBeforeUnlockScreen" /> <java-symbol type="bool" name="config_enableLockScreenRotation" /> <java-symbol type="bool" name="config_lidControlsSleep" /> Loading
policy/src/com/android/internal/policy/impl/LockScreen.java +4 −1 Original line number Diff line number Diff line Loading @@ -587,6 +587,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen { return !configDisabled || isTestHarness || fileOverride || menuOverride; } boolean mHomeUnlockScreen = (Settings.System.getInt(mContext.getContentResolver(), Settings.System.HOME_UNLOCK_SCREEN, 0) == 1); /** * @param context Used to setup the view. * @param configuration The current configuration. Used to use when selecting layout, etc. Loading Loading @@ -733,7 +735,8 @@ class LockScreen extends LinearLayout implements KeyguardScreen { @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_MENU && mEnableMenuKeyInLockScreen) { if ((keyCode == KeyEvent.KEYCODE_MENU && mEnableMenuKeyInLockScreen) || (keyCode == KeyEvent.KEYCODE_HOME && mHomeUnlockScreen)) { mCallback.goToUnlockScreen(); } return false; Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +7 −0 Original line number Diff line number Diff line Loading @@ -552,6 +552,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { // Behavior of ENDCALL Button. (See Settings.System.END_BUTTON_BEHAVIOR.) int mEndcallBehavior; // Behavior of home unlock boolean mHomeUnlockScreen; // Behavior of POWER button while in-call and screen on. // (See Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR.) int mIncallPowerBehavior; Loading Loading @@ -643,6 +646,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { Settings.System.VOLBTN_MUSIC_CONTROLS), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.ACCELEROMETER_ROTATION), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.HOME_UNLOCK_SCREEN), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.USER_ROTATION), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Loading Loading @@ -1364,6 +1369,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { Settings.System.VOLUME_WAKE_SCREEN, 0) == 1); mVolBtnMusicControls = (Settings.System.getInt(resolver, Settings.System.VOLBTN_MUSIC_CONTROLS, 1) == 1); mHomeUnlockScreen = (Settings.System.getInt(resolver, Settings.System.HOME_UNLOCK_SCREEN, 0) == 1); boolean keyRebindingEnabled = Settings.System.getInt(resolver, Settings.System.HARDWARE_KEY_REBINDING, 0) == 1; Loading