Prerequisites for TAPL
Adding things that will be used by TAPL.
1. Adding Ctrl+W to open widgets
2. Marking a UI element with shortcuts_and_widgets
id. Example of usage: we want to be sure we are in all apps.
A somewhat paranoid way to check this is to check that
apps_view is on, and workspace and overview_panel are off.
However, workspace is always in the hierarchy. We use
shortcuts_and_widgets instead.
Bug: 110103162
Test: Manual
Change-Id: I2a851e16c477f7ee895b459530bc5a1ff19e32f8
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index aaeeb63..3a8679e 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2328,6 +2328,8 @@
if (isInState(NORMAL)) {
shortcutInfos.add(new KeyboardShortcutInfo(getString(R.string.all_apps_button_label),
KeyEvent.KEYCODE_A, KeyEvent.META_CTRL_ON));
+ shortcutInfos.add(new KeyboardShortcutInfo(getString(R.string.widget_button_text),
+ KeyEvent.KEYCODE_W, KeyEvent.META_CTRL_ON));
}
final View currentFocus = getCurrentFocus();
if (currentFocus != null) {
@@ -2376,6 +2378,12 @@
return true;
}
break;
+ case KeyEvent.KEYCODE_W:
+ if (isInState(NORMAL)) {
+ OptionsPopupView.openWidgets(this);
+ return true;
+ }
+ break;
}
}
return super.onKeyShortcut(keyCode, event);