Loading core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -9040,6 +9040,13 @@ public final class Settings { * @hide */ public static final String MAX_NOTIFICATION_ENQUEUE_RATE = "max_notification_enqueue_rate"; /** * Whether SystemUI navigation keys is enabled. * @hide */ public static final String SYSTEM_NAVIGATION_KEYS_ENABLED = "system_navigation_keys_enabled"; } /** Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2492,4 +2492,7 @@ <!-- Flag indicating whether round icons should be parsed from the application manifest. --> <bool name="config_useRoundIcon">false</bool> <!-- True if the device supports system navigation keys. --> <bool name="config_supportSystemNavigationKeys">false</bool> </resources> core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2620,4 +2620,7 @@ <java-symbol type="id" name="cross_task_transition" /> <java-symbol type="bool" name="config_useRoundIcon" /> <!-- For System navigation keys --> <java-symbol type="bool" name="config_supportSystemNavigationKeys" /> </resources> services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -5856,7 +5856,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { */ private void interceptStatusBarKey(KeyEvent event) { final int e = event.getKeyCode(); if (event.getAction() == KeyEvent.ACTION_UP) { if (event.getAction() == KeyEvent.ACTION_UP && areSystemNavigationKeysEnabled()) { boolean doOpen = false; boolean doClose = false; doOpen = (e == KeyEvent.KEYCODE_FP_NAV_DOWN); Loading Loading @@ -7267,6 +7267,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, 0) == 1; } private boolean areSystemNavigationKeysEnabled() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SYSTEM_NAVIGATION_KEYS_ENABLED, 0) == 1; } @Override public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always) { if (!mVibrator.hasVibrator()) { Loading Loading
core/java/android/provider/Settings.java +7 −0 Original line number Diff line number Diff line Loading @@ -9040,6 +9040,13 @@ public final class Settings { * @hide */ public static final String MAX_NOTIFICATION_ENQUEUE_RATE = "max_notification_enqueue_rate"; /** * Whether SystemUI navigation keys is enabled. * @hide */ public static final String SYSTEM_NAVIGATION_KEYS_ENABLED = "system_navigation_keys_enabled"; } /** Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2492,4 +2492,7 @@ <!-- Flag indicating whether round icons should be parsed from the application manifest. --> <bool name="config_useRoundIcon">false</bool> <!-- True if the device supports system navigation keys. --> <bool name="config_supportSystemNavigationKeys">false</bool> </resources>
core/res/res/values/symbols.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2620,4 +2620,7 @@ <java-symbol type="id" name="cross_task_transition" /> <java-symbol type="bool" name="config_useRoundIcon" /> <!-- For System navigation keys --> <java-symbol type="bool" name="config_supportSystemNavigationKeys" /> </resources>
services/core/java/com/android/server/policy/PhoneWindowManager.java +6 −1 Original line number Diff line number Diff line Loading @@ -5856,7 +5856,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { */ private void interceptStatusBarKey(KeyEvent event) { final int e = event.getKeyCode(); if (event.getAction() == KeyEvent.ACTION_UP) { if (event.getAction() == KeyEvent.ACTION_UP && areSystemNavigationKeysEnabled()) { boolean doOpen = false; boolean doClose = false; doOpen = (e == KeyEvent.KEYCODE_FP_NAV_DOWN); Loading Loading @@ -7267,6 +7267,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, 0) == 1; } private boolean areSystemNavigationKeysEnabled() { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SYSTEM_NAVIGATION_KEYS_ENABLED, 0) == 1; } @Override public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always) { if (!mVibrator.hasVibrator()) { Loading