Keyboard Shortcuts: Add Keycodes for shortcut representation
This changes the current API given app feedback received. In order to use
keycodes as well as chars we also must implement a mapping of Keycodes to
Display labels as only keys with a single char representation are provided
by KeyCharacterMap.
Bug: 27409783
Change-Id: I3da653adc4b8cbc66a4d1aa24a5f9181f71e83c3
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index 6a98488..0ffab5b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -107,7 +107,7 @@
public void toggleRecentApps();
public void toggleSplitScreen();
public void preloadRecentApps();
- public void toggleKeyboardShortcutsMenu();
+ public void toggleKeyboardShortcutsMenu(int deviceId);
public void cancelPreloadRecentApps();
public void setWindowState(int window, int state);
public void buzzBeepBlinked();
@@ -254,10 +254,10 @@
}
@Override
- public void toggleKeyboardShortcutsMenu() {
+ public void toggleKeyboardShortcutsMenu(int deviceId) {
synchronized (mLock) {
mHandler.removeMessages(MSG_TOGGLE_KEYBOARD_SHORTCUTS);
- mHandler.obtainMessage(MSG_TOGGLE_KEYBOARD_SHORTCUTS).sendToTarget();
+ mHandler.obtainMessage(MSG_TOGGLE_KEYBOARD_SHORTCUTS, deviceId, 0).sendToTarget();
}
}
@@ -425,7 +425,7 @@
mCallbacks.cancelPreloadRecentApps();
break;
case MSG_TOGGLE_KEYBOARD_SHORTCUTS:
- mCallbacks.toggleKeyboardShortcutsMenu();
+ mCallbacks.toggleKeyboardShortcutsMenu(msg.arg1);
break;
case MSG_SET_WINDOW_STATE:
mCallbacks.setWindowState(msg.arg1, msg.arg2);