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/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 2d2a08a..1c5d28a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1206,10 +1206,10 @@
}
@Override
- public void toggleKeyboardShortcutsMenu() {
+ public void toggleKeyboardShortcutsMenu(int deviceId) {
int msg = MSG_TOGGLE_KEYBOARD_SHORTCUTS_MENU;
mHandler.removeMessages(msg);
- mHandler.sendEmptyMessage(msg);
+ mHandler.obtainMessage(msg, deviceId, 0).sendToTarget();
}
/** Jumps to the next affiliated task in the group. */
@@ -1295,8 +1295,8 @@
}
}
- protected void toggleKeyboardShortcuts() {
- getKeyboardShortcuts().toggleKeyboardShortcuts();
+ protected void toggleKeyboardShortcuts(int deviceId) {
+ getKeyboardShortcuts().toggleKeyboardShortcuts(deviceId);
}
protected void cancelPreloadingRecents() {
@@ -1469,7 +1469,7 @@
showRecentsPreviousAffiliatedTask();
break;
case MSG_TOGGLE_KEYBOARD_SHORTCUTS_MENU:
- toggleKeyboardShortcuts();
+ toggleKeyboardShortcuts(m.arg1);
break;
}
}