diff options
author | Sandeep Siddhartha <sansid@google.com> | 2014-01-28 11:34:30 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-28 11:34:30 -0800 |
commit | ef154fac2469d265a50f339e41f9be939156d915 (patch) | |
tree | 4afabf28d1892cfece7753272d1e2b90d73f17e4 | |
parent | 9c09d8e7d0c0e0e2cd5a4c725a5e744a271f0563 (diff) | |
parent | d805837a877bb503d7890c4f92cfd183dec8c5ee (diff) | |
download | android_packages_apps_Trebuchet-ef154fac2469d265a50f339e41f9be939156d915.tar.gz android_packages_apps_Trebuchet-ef154fac2469d265a50f339e41f9be939156d915.tar.bz2 android_packages_apps_Trebuchet-ef154fac2469d265a50f339e41f9be939156d915.zip |
am d805837a: Add callback for "Widgets" button click in launcher
* commit 'd805837a877bb503d7890c4f92cfd183dec8c5ee':
Add callback for "Widgets" button click in launcher
-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 709f4cf53..fca443c58 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2373,7 +2373,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); @@ -2466,6 +2466,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); |