diff options
author | Sandeep Siddhartha <sansid@google.com> | 2014-01-28 10:41:15 -0800 |
---|---|---|
committer | Danesh Mondegarian <daneshm90@gmail.com> | 2014-06-07 06:47:59 -0700 |
commit | b4a392172be33c18d4861d8af06490e779d46c64 (patch) | |
tree | 408039b9c693ab15dc7cb6bc77cddcd9746aff75 | |
parent | 7d06e5774c37cb2a6ecb73fe9b33bc864e354c72 (diff) | |
download | android_packages_apps_Trebuchet-b4a392172be33c18d4861d8af06490e779d46c64.tar.gz android_packages_apps_Trebuchet-b4a392172be33c18d4861d8af06490e779d46c64.tar.bz2 android_packages_apps_Trebuchet-b4a392172be33c18d4861d8af06490e779d46c64.zip |
Add callback for "Widgets" button click in launcher
Bug: 12553852
Change-Id: I8befd046242b32e86dbc6c98e6d97f0307380dd0
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 54b121897..8a0fe6c05 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2580,7 +2580,7 @@ public class Launcher extends Activity final String shortcutClass = intent.getComponent().getClassName(); if (shortcutClass.equals(WidgetAdder.class.getName())) { - showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true); + onClickAddWidgetButton(); return; } else if (shortcutClass.equals(MemoryDumpActivity.class.getName())) { MemoryDumpActivity.startDump(this); @@ -2674,6 +2674,14 @@ public class Launcher extends Activity showAllApps(true, AppsCustomizePagedView.ContentType.Applications, false); } + /** + * Event handler for the (Add) Widgets button that appears after a long press + * on the home screen. + */ + protected void onClickAddWidgetButton() { + showAllApps(true, AppsCustomizePagedView.ContentType.Widgets, true); + } + public void onTouchDownAllAppsButton(View v) { // Provide the same haptic feedback that the system offers for virtual keys. v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); |