Loading core/java/com/android/internal/statusbar/IStatusBar.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ oneway interface IStatusBar void cancelPreloadRecentApps(); void showScreenPinningRequest(); void showKeyboardShortcutsMenu(); /** * Notifies the status bar that an app transition is pending to delay applying some flags with * visual impact until {@link #appTransitionReady} is called. Loading core/java/com/android/internal/statusbar/IStatusBarService.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ interface IStatusBarService void preloadRecentApps(); void cancelPreloadRecentApps(); void showKeyboardShortcutsMenu(); /** * Notifies the status bar that an app transition is pending to delay applying some flags with * visual impact until {@link #appTransitionReady} is called. Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +15 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 1023; protected static final int MSG_SHOW_NEXT_AFFILIATED_TASK = 1024; protected static final int MSG_SHOW_PREV_AFFILIATED_TASK = 1025; protected static final int MSG_SHOW_KEYBOARD_SHORTCUTS_MENU = 1026; protected static final boolean ENABLE_HEADS_UP = true; // scores above this threshold should be displayed in heads up mode. Loading Loading @@ -1066,6 +1067,13 @@ public abstract class BaseStatusBar extends SystemUI implements mHandler.sendEmptyMessage(msg); } @Override public void showKeyboardShortcutsMenu() { int msg = MSG_SHOW_KEYBOARD_SHORTCUTS_MENU; mHandler.removeMessages(msg); mHandler.sendEmptyMessage(msg); } /** Jumps to the next affiliated task in the group. */ public void showNextAffiliatedTask() { int msg = MSG_SHOW_NEXT_AFFILIATED_TASK; Loading Loading @@ -1143,6 +1151,10 @@ public abstract class BaseStatusBar extends SystemUI implements } } protected void showKeyboardShortcuts() { Toast.makeText(mContext, "Show keyboard shortcuts screen", Toast.LENGTH_LONG).show(); } protected void cancelPreloadingRecents() { if (mRecents != null) { mRecents.cancelPreloadingRecents(); Loading Loading @@ -1253,6 +1265,9 @@ public abstract class BaseStatusBar extends SystemUI implements case MSG_SHOW_PREV_AFFILIATED_TASK: showRecentsPreviousAffiliatedTask(); break; case MSG_SHOW_KEYBOARD_SHORTCUTS_MENU: showKeyboardShortcuts(); break; } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +13 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public class CommandQueue extends IStatusBar.Stub { private static final int MSG_APP_TRANSITION_STARTING = 21 << MSG_SHIFT; private static final int MSG_ASSIST_DISCLOSURE = 22 << MSG_SHIFT; private static final int MSG_START_ASSIST = 23 << MSG_SHIFT; private static final int MSG_SHOW_KEYBOARD_SHORTCUTS = 24 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; Loading Loading @@ -98,6 +99,7 @@ public class CommandQueue extends IStatusBar.Stub { public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); public void toggleRecentApps(); public void preloadRecentApps(); public void showKeyboardShortcutsMenu(); public void cancelPreloadRecentApps(); public void setWindowState(int window, int state); public void buzzBeepBlinked(); Loading Loading @@ -224,6 +226,14 @@ public class CommandQueue extends IStatusBar.Stub { } } @Override public void showKeyboardShortcutsMenu() { synchronized (mList) { mHandler.removeMessages(MSG_SHOW_KEYBOARD_SHORTCUTS); mHandler.obtainMessage(MSG_SHOW_KEYBOARD_SHORTCUTS).sendToTarget(); } } public void setWindowState(int window, int state) { synchronized (mList) { // don't coalesce these Loading Loading @@ -360,6 +370,9 @@ public class CommandQueue extends IStatusBar.Stub { case MSG_CANCEL_PRELOAD_RECENT_APPS: mCallbacks.cancelPreloadRecentApps(); break; case MSG_SHOW_KEYBOARD_SHORTCUTS: mCallbacks.showKeyboardShortcutsMenu(); break; case MSG_SET_WINDOW_STATE: mCallbacks.setWindowState(msg.arg1, msg.arg2); break; Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +17 −0 Original line number Diff line number Diff line Loading @@ -2835,6 +2835,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } } } else if (keyCode == KeyEvent.KEYCODE_SLASH && event.isMetaPressed()) { if (down) { if (repeatCount == 0) { showKeyboardShortcutsMenu(); } } } else if (keyCode == KeyEvent.KEYCODE_ASSIST) { if (down) { if (repeatCount == 0) { Loading Loading @@ -3255,6 +3261,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } private void showKeyboardShortcutsMenu() { try { IStatusBarService statusbar = getStatusBarService(); if (statusbar != null) { statusbar.showKeyboardShortcutsMenu(); } } catch (RemoteException e) { Slog.e(TAG, "RemoteException when showing keyboard shortcuts menu", e); } } private void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHome) { mPreloadedRecentApps = false; // preloading no longer needs to be canceled try { Loading Loading
core/java/com/android/internal/statusbar/IStatusBar.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ oneway interface IStatusBar void cancelPreloadRecentApps(); void showScreenPinningRequest(); void showKeyboardShortcutsMenu(); /** * Notifies the status bar that an app transition is pending to delay applying some flags with * visual impact until {@link #appTransitionReady} is called. Loading
core/java/com/android/internal/statusbar/IStatusBarService.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,8 @@ interface IStatusBarService void preloadRecentApps(); void cancelPreloadRecentApps(); void showKeyboardShortcutsMenu(); /** * Notifies the status bar that an app transition is pending to delay applying some flags with * visual impact until {@link #appTransitionReady} is called. Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +15 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ public abstract class BaseStatusBar extends SystemUI implements protected static final int MSG_CANCEL_PRELOAD_RECENT_APPS = 1023; protected static final int MSG_SHOW_NEXT_AFFILIATED_TASK = 1024; protected static final int MSG_SHOW_PREV_AFFILIATED_TASK = 1025; protected static final int MSG_SHOW_KEYBOARD_SHORTCUTS_MENU = 1026; protected static final boolean ENABLE_HEADS_UP = true; // scores above this threshold should be displayed in heads up mode. Loading Loading @@ -1066,6 +1067,13 @@ public abstract class BaseStatusBar extends SystemUI implements mHandler.sendEmptyMessage(msg); } @Override public void showKeyboardShortcutsMenu() { int msg = MSG_SHOW_KEYBOARD_SHORTCUTS_MENU; mHandler.removeMessages(msg); mHandler.sendEmptyMessage(msg); } /** Jumps to the next affiliated task in the group. */ public void showNextAffiliatedTask() { int msg = MSG_SHOW_NEXT_AFFILIATED_TASK; Loading Loading @@ -1143,6 +1151,10 @@ public abstract class BaseStatusBar extends SystemUI implements } } protected void showKeyboardShortcuts() { Toast.makeText(mContext, "Show keyboard shortcuts screen", Toast.LENGTH_LONG).show(); } protected void cancelPreloadingRecents() { if (mRecents != null) { mRecents.cancelPreloadingRecents(); Loading Loading @@ -1253,6 +1265,9 @@ public abstract class BaseStatusBar extends SystemUI implements case MSG_SHOW_PREV_AFFILIATED_TASK: showRecentsPreviousAffiliatedTask(); break; case MSG_SHOW_KEYBOARD_SHORTCUTS_MENU: showKeyboardShortcuts(); break; } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +13 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ public class CommandQueue extends IStatusBar.Stub { private static final int MSG_APP_TRANSITION_STARTING = 21 << MSG_SHIFT; private static final int MSG_ASSIST_DISCLOSURE = 22 << MSG_SHIFT; private static final int MSG_START_ASSIST = 23 << MSG_SHIFT; private static final int MSG_SHOW_KEYBOARD_SHORTCUTS = 24 << MSG_SHIFT; public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; Loading Loading @@ -98,6 +99,7 @@ public class CommandQueue extends IStatusBar.Stub { public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey); public void toggleRecentApps(); public void preloadRecentApps(); public void showKeyboardShortcutsMenu(); public void cancelPreloadRecentApps(); public void setWindowState(int window, int state); public void buzzBeepBlinked(); Loading Loading @@ -224,6 +226,14 @@ public class CommandQueue extends IStatusBar.Stub { } } @Override public void showKeyboardShortcutsMenu() { synchronized (mList) { mHandler.removeMessages(MSG_SHOW_KEYBOARD_SHORTCUTS); mHandler.obtainMessage(MSG_SHOW_KEYBOARD_SHORTCUTS).sendToTarget(); } } public void setWindowState(int window, int state) { synchronized (mList) { // don't coalesce these Loading Loading @@ -360,6 +370,9 @@ public class CommandQueue extends IStatusBar.Stub { case MSG_CANCEL_PRELOAD_RECENT_APPS: mCallbacks.cancelPreloadRecentApps(); break; case MSG_SHOW_KEYBOARD_SHORTCUTS: mCallbacks.showKeyboardShortcutsMenu(); break; case MSG_SET_WINDOW_STATE: mCallbacks.setWindowState(msg.arg1, msg.arg2); break; Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +17 −0 Original line number Diff line number Diff line Loading @@ -2835,6 +2835,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } } } else if (keyCode == KeyEvent.KEYCODE_SLASH && event.isMetaPressed()) { if (down) { if (repeatCount == 0) { showKeyboardShortcutsMenu(); } } } else if (keyCode == KeyEvent.KEYCODE_ASSIST) { if (down) { if (repeatCount == 0) { Loading Loading @@ -3255,6 +3261,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } private void showKeyboardShortcutsMenu() { try { IStatusBarService statusbar = getStatusBarService(); if (statusbar != null) { statusbar.showKeyboardShortcutsMenu(); } } catch (RemoteException e) { Slog.e(TAG, "RemoteException when showing keyboard shortcuts menu", e); } } private void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHome) { mPreloadedRecentApps = false; // preloading no longer needs to be canceled try { Loading