Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +18 −8 Original line number Diff line number Diff line Loading @@ -2090,8 +2090,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { "Home - Long Press"); switch (mLongPressOnHomeBehavior) { case LONG_PRESS_HOME_ALL_APPS: logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS); if (mHasFeatureLeanback) { launchAllAppsAction(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS); } else { launchAllAppsViaA11y(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS); } break; case LONG_PRESS_HOME_ASSIST: logKeyboardSystemsEvent(event, KeyboardLogEvent.LAUNCH_ASSISTANT); Loading Loading @@ -3683,12 +3688,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { } break; case KeyEvent.KEYCODE_ALL_APPS: if (!down) { if (firstDown) { if (mHasFeatureLeanback) { mHandler.removeMessages(MSG_HANDLE_ALL_APPS); Message msg = mHandler.obtainMessage(MSG_HANDLE_ALL_APPS); msg.setAsynchronous(true); msg.sendToTarget(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS); } else { launchAllAppsViaA11y(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS); } } return true; case KeyEvent.KEYCODE_NOTIFICATION: Loading services/tests/wmtests/src/com/android/server/policy/ShortcutLoggingTests.java +10 −8 Original line number Diff line number Diff line Loading @@ -132,8 +132,9 @@ public class ShortcutLoggingTests extends ShortcutKeyTestBase { KeyboardLogEvent.VOLUME_DOWN, KeyEvent.KEYCODE_VOLUME_DOWN, 0}, {"VOLUME_MUTE key -> Mute Volume", new int[]{KeyEvent.KEYCODE_VOLUME_MUTE}, KeyboardLogEvent.VOLUME_MUTE, KeyEvent.KEYCODE_VOLUME_MUTE, 0}, {"ALL_APPS key -> Open App Drawer", new int[]{KeyEvent.KEYCODE_ALL_APPS}, KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_ALL_APPS, 0}, {"ALL_APPS key -> Open App Drawer in Accessibility mode", new int[]{KeyEvent.KEYCODE_ALL_APPS}, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_ALL_APPS, 0}, {"SEARCH key -> Launch Search Activity", new int[]{KeyEvent.KEYCODE_SEARCH}, KeyboardLogEvent.LAUNCH_SEARCH, KeyEvent.KEYCODE_SEARCH, 0}, {"LANGUAGE_SWITCH key -> Switch Keyboard Language", Loading Loading @@ -259,14 +260,15 @@ public class ShortcutLoggingTests extends ShortcutKeyTestBase { {"Long press META + H -> Launch assistant", new int[]{META_KEY, KeyEvent.KEYCODE_H}, LONG_PRESS_HOME_ASSIST, KeyboardLogEvent.LAUNCH_ASSISTANT, KeyEvent.KEYCODE_H, META_ON}, {"Long press HOME key -> Open App Drawer", {"Long press HOME key -> Open App Drawer in Accessibility mode", new int[]{KeyEvent.KEYCODE_HOME}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_HOME, 0}, {"Long press META + ENTER -> Open App Drawer", KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_HOME, 0}, {"Long press META + ENTER -> Open App Drawer in Accessibility mode", new int[]{META_KEY, KeyEvent.KEYCODE_ENTER}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_ENTER, META_ON}, {"Long press META + H -> Open App Drawer", new int[]{META_KEY, KeyEvent.KEYCODE_H}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ALL_APPS, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_ENTER, META_ON}, {"Long press META + H -> Open App Drawer in Accessibility mode", new int[]{META_KEY, KeyEvent.KEYCODE_H}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_H, META_ON}}; } Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +18 −8 Original line number Diff line number Diff line Loading @@ -2090,8 +2090,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { "Home - Long Press"); switch (mLongPressOnHomeBehavior) { case LONG_PRESS_HOME_ALL_APPS: logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS); if (mHasFeatureLeanback) { launchAllAppsAction(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS); } else { launchAllAppsViaA11y(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS); } break; case LONG_PRESS_HOME_ASSIST: logKeyboardSystemsEvent(event, KeyboardLogEvent.LAUNCH_ASSISTANT); Loading Loading @@ -3683,12 +3688,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { } break; case KeyEvent.KEYCODE_ALL_APPS: if (!down) { if (firstDown) { if (mHasFeatureLeanback) { mHandler.removeMessages(MSG_HANDLE_ALL_APPS); Message msg = mHandler.obtainMessage(MSG_HANDLE_ALL_APPS); msg.setAsynchronous(true); msg.sendToTarget(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ALL_APPS); } else { launchAllAppsViaA11y(); logKeyboardSystemsEvent(event, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS); } } return true; case KeyEvent.KEYCODE_NOTIFICATION: Loading
services/tests/wmtests/src/com/android/server/policy/ShortcutLoggingTests.java +10 −8 Original line number Diff line number Diff line Loading @@ -132,8 +132,9 @@ public class ShortcutLoggingTests extends ShortcutKeyTestBase { KeyboardLogEvent.VOLUME_DOWN, KeyEvent.KEYCODE_VOLUME_DOWN, 0}, {"VOLUME_MUTE key -> Mute Volume", new int[]{KeyEvent.KEYCODE_VOLUME_MUTE}, KeyboardLogEvent.VOLUME_MUTE, KeyEvent.KEYCODE_VOLUME_MUTE, 0}, {"ALL_APPS key -> Open App Drawer", new int[]{KeyEvent.KEYCODE_ALL_APPS}, KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_ALL_APPS, 0}, {"ALL_APPS key -> Open App Drawer in Accessibility mode", new int[]{KeyEvent.KEYCODE_ALL_APPS}, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_ALL_APPS, 0}, {"SEARCH key -> Launch Search Activity", new int[]{KeyEvent.KEYCODE_SEARCH}, KeyboardLogEvent.LAUNCH_SEARCH, KeyEvent.KEYCODE_SEARCH, 0}, {"LANGUAGE_SWITCH key -> Switch Keyboard Language", Loading Loading @@ -259,14 +260,15 @@ public class ShortcutLoggingTests extends ShortcutKeyTestBase { {"Long press META + H -> Launch assistant", new int[]{META_KEY, KeyEvent.KEYCODE_H}, LONG_PRESS_HOME_ASSIST, KeyboardLogEvent.LAUNCH_ASSISTANT, KeyEvent.KEYCODE_H, META_ON}, {"Long press HOME key -> Open App Drawer", {"Long press HOME key -> Open App Drawer in Accessibility mode", new int[]{KeyEvent.KEYCODE_HOME}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_HOME, 0}, {"Long press META + ENTER -> Open App Drawer", KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_HOME, 0}, {"Long press META + ENTER -> Open App Drawer in Accessibility mode", new int[]{META_KEY, KeyEvent.KEYCODE_ENTER}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ALL_APPS, KeyEvent.KEYCODE_ENTER, META_ON}, {"Long press META + H -> Open App Drawer", new int[]{META_KEY, KeyEvent.KEYCODE_H}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ALL_APPS, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_ENTER, META_ON}, {"Long press META + H -> Open App Drawer in Accessibility mode", new int[]{META_KEY, KeyEvent.KEYCODE_H}, LONG_PRESS_HOME_ALL_APPS, KeyboardLogEvent.ACCESSIBILITY_ALL_APPS, KeyEvent.KEYCODE_H, META_ON}}; } Loading