summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2014-03-18 11:28:19 -0700
committerMohammadinamul Sheik <inamul@google.com>2014-03-18 11:28:19 -0700
commit3b1a54a2069cfe576dbb043ccf23d24371ffd3a5 (patch)
treec73c60c0b0d9c6f3cef49f67cb6aa96aae87aa2b /src
parente04e8b2a142f22bfeb8729e542f51d5510327eb9 (diff)
downloadandroid_packages_apps_Trebuchet-3b1a54a2069cfe576dbb043ccf23d24371ffd3a5.tar.gz
android_packages_apps_Trebuchet-3b1a54a2069cfe576dbb043ccf23d24371ffd3a5.tar.bz2
android_packages_apps_Trebuchet-3b1a54a2069cfe576dbb043ccf23d24371ffd3a5.zip
Add onClickPagedViewIcon to the Launcher.
Change-Id: I34505ee5c9a6fe6ddd1a9f3134829fe0481e8bc0
Diffstat (limited to 'src')
-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 f1ce23524..19dbe6afd 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2444,6 +2444,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}.