Hook up Ctrl + '/' to SysUI for a Keyboard Shortcuts screen
This CL adds the necessary hooks between PhoneWindowManager
and SysUI to show a keyboard shortcuts screen given a specific
shortcut combination. SysUI for now just shows a Toast.
Change-Id: Icf43a81776b04a2e96a540f45b7cd3464342d679
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index a1b07b5..d0cd6cb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -64,6 +64,7 @@
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;
@@ -98,6 +99,7 @@
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();
@@ -224,6 +226,14 @@
}
}
+ @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
@@ -360,6 +370,9 @@
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;