diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-09-21 15:57:55 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-09-23 15:57:08 -0700 |
commit | 66b24572e41a13ba5b85b37cf7be64804299c8f6 (patch) | |
tree | eb28b6c264a0a589a911dbcf5540621b111953d9 /src/com/android/launcher3/FocusHelper.java | |
parent | f09bfab404fa0118a6c3cb6a317edaab3907eb0b (diff) | |
download | android_packages_apps_Trebuchet-66b24572e41a13ba5b85b37cf7be64804299c8f6.tar.gz android_packages_apps_Trebuchet-66b24572e41a13ba5b85b37cf7be64804299c8f6.tar.bz2 android_packages_apps_Trebuchet-66b24572e41a13ba5b85b37cf7be64804299c8f6.zip |
Exposing custom actions using keyboard shortcut
Keyboard shortcuts:
ctrl+A => Open all apps
ctrl+S => shows deep shortcuts
ctrl+O => shows custom actions popup
This also removes the direct delete/uninstall key shortcuts, making
actidental icon removal less likely
Bug: 24065447
Change-Id: Iae63370c0f33620628567cffd4df024064d4d02e
Diffstat (limited to 'src/com/android/launcher3/FocusHelper.java')
-rw-r--r-- | src/com/android/launcher3/FocusHelper.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/com/android/launcher3/FocusHelper.java b/src/com/android/launcher3/FocusHelper.java index c73ceea14..de079feda 100644 --- a/src/com/android/launcher3/FocusHelper.java +++ b/src/com/android/launcher3/FocusHelper.java @@ -250,14 +250,6 @@ public class FocusHelper { } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT && profile.isVerticalBarLayout()) { keyCode = KeyEvent.KEYCODE_PAGE_DOWN; - } else if (isUninstallKeyChord(e)) { - matrix = FocusLogic.createSparseMatrix(iconLayout); - if (UninstallDropTarget.supportsDrop(launcher, itemInfo)) { - UninstallDropTarget.startUninstallActivity(launcher, itemInfo); - } - } else if (isDeleteKeyChord(e)) { - matrix = FocusLogic.createSparseMatrix(iconLayout); - launcher.removeItem(v, itemInfo, true /* deleteFromDb */); } else { // For other KEYCODE_DPAD_LEFT and KEYCODE_DPAD_RIGHT navigation, do not use the // matrix extended with hotseat. @@ -374,14 +366,6 @@ public class FocusHelper { } else if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT && profile.isVerticalBarLayout()) { matrix = FocusLogic.createSparseMatrixWithHotseat(iconLayout, hotseatLayout, profile); - } else if (isUninstallKeyChord(e)) { - matrix = FocusLogic.createSparseMatrix(iconLayout); - if (UninstallDropTarget.supportsDrop(launcher, itemInfo)) { - UninstallDropTarget.startUninstallActivity(launcher, itemInfo); - } - } else if (isDeleteKeyChord(e)) { - matrix = FocusLogic.createSparseMatrix(iconLayout); - launcher.removeItem(v, itemInfo, true /* deleteFromDb */); } else { matrix = FocusLogic.createSparseMatrix(iconLayout); } @@ -532,24 +516,6 @@ public class FocusHelper { } } - /** - * Returns whether the key event represents a valid uninstall key chord. - */ - private static boolean isUninstallKeyChord(KeyEvent event) { - int keyCode = event.getKeyCode(); - return (keyCode == KeyEvent.KEYCODE_DEL || keyCode == KeyEvent.KEYCODE_FORWARD_DEL) && - event.hasModifiers(KeyEvent.META_CTRL_ON | KeyEvent.META_SHIFT_ON); - } - - /** - * Returns whether the key event represents a valid delete key chord. - */ - private static boolean isDeleteKeyChord(KeyEvent event) { - int keyCode = event.getKeyCode(); - return (keyCode == KeyEvent.KEYCODE_DEL || keyCode == KeyEvent.KEYCODE_FORWARD_DEL) && - event.hasModifiers(KeyEvent.META_CTRL_ON); - } - private static View handlePreviousPageLastItem(Workspace workspace, CellLayout hotseatLayout, int pageIndex, boolean isRtl) { if (pageIndex - 1 < 0) { |