summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2014-03-18 20:36:38 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-18 20:36:38 +0000
commit2c35eb3437cf9d93426a555f7efd8a9749ffef74 (patch)
treea31bd828839185e2865ba8dcebc93630cf5c4c9b
parentb6628d4271f1385deb9677ddb03c46b578ed3a98 (diff)
parent7b763d01b20c453899948f902e795dc01a9f11f2 (diff)
downloadandroid_packages_apps_Trebuchet-2c35eb3437cf9d93426a555f7efd8a9749ffef74.tar.gz
android_packages_apps_Trebuchet-2c35eb3437cf9d93426a555f7efd8a9749ffef74.tar.bz2
android_packages_apps_Trebuchet-2c35eb3437cf9d93426a555f7efd8a9749ffef74.zip
am 7b763d01: am e769d168: Merge "Add onClickPagedViewIcon to the Launcher." into ub-now-mister-ugly
* commit '7b763d01b20c453899948f902e795dc01a9f11f2': Add onClickPagedViewIcon to the Launcher.
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java3
-rw-r--r--src/com/android/launcher3/Launcher.java11
2 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 251ae2108..e5e1580ee 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -511,8 +511,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
if (mPressedIcon != null) {
mPressedIcon.lockDrawableState();
}
- mLauncher.startActivitySafely(v, appInfo.intent, appInfo);
- mLauncher.getStats().recordLaunch(appInfo.intent);
+ mLauncher.onClickPagedViewIcon(v, appInfo);
} else if (v instanceof PagedViewWidget) {
// Let the user know that they have to long press to add a widget
if (mWidgetInstructionToast != null) {
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2d1d2f6ed..05be4ae67 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2447,6 +2447,17 @@ public class Launcher extends Activity
}
/**
+ * Event handler for a paged view icon click.
+ * @param v The view that was clicked.
+ * @param appInfo The {link AppInfo} of the view.
+ */
+ public void onClickPagedViewIcon(View v, AppInfo appInfo) {
+ if (LOGD) Log.d(TAG, "onClickPagedViewIcon");
+ startActivitySafely(v, appInfo.intent, appInfo);
+ getStats().recordLaunch(appInfo.intent);
+ }
+
+ /**
* Event handler for an app shortcut click.
*
* @param v The view that was clicked. Must be a tagged with a {@link ShortcutInfo}.