summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-08-10 16:06:22 -0700
committerTony Wickham <twickham@google.com>2016-08-10 18:26:41 -0700
commitbe06874c8105cf1beec8171235600da9f4ee035e (patch)
treec328c49a09e9da56de3fc14c814d598c79584beb /src/com/android/launcher3/allapps/AllAppsRecyclerView.java
parent37aba27bbcc89417588a638d61099288553387df (diff)
downloadandroid_packages_apps_Trebuchet-be06874c8105cf1beec8171235600da9f4ee035e.tar.gz
android_packages_apps_Trebuchet-be06874c8105cf1beec8171235600da9f4ee035e.tar.bz2
android_packages_apps_Trebuchet-be06874c8105cf1beec8171235600da9f4ee035e.zip
Log shortcuts open on ACTION_UP instead of in showForIcon().
- We only want to log when the container is opened and potentially used, not when a long press is followed by a drag-and-drop. - Also cleaned up code that was determining the container of the app icon, since LaunchSourceProvider.fillInLaunchSourceData() can do that instead (it's more robust and consistent). Bug: 30791570 Change-Id: I05b6750f26182fda8a9940ac66f1371c2d228ca9
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsRecyclerView.java')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsRecyclerView.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index 55f544caa..218347743 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -208,12 +208,8 @@ public class AllAppsRecyclerView extends BaseRecyclerView
@Override
public void fillInLaunchSourceData(View v, ItemInfo info, Target target, Target targetParent) {
- targetParent.containerType = getContainerType(v);
- }
-
- public int getContainerType(View v) {
if (mApps.hasFilter()) {
- return LauncherLogProto.SEARCHRESULT;
+ targetParent.containerType = LauncherLogProto.SEARCHRESULT;
} else {
if (v instanceof BubbleTextView) {
BubbleTextView icon = (BubbleTextView) v;
@@ -222,11 +218,12 @@ public class AllAppsRecyclerView extends BaseRecyclerView
List<AlphabeticalAppsList.AdapterItem> items = mApps.getAdapterItems();
AlphabeticalAppsList.AdapterItem item = items.get(position);
if (item.viewType == AllAppsGridAdapter.VIEW_TYPE_PREDICTION_ICON) {
- return LauncherLogProto.PREDICTION;
+ targetParent.containerType = LauncherLogProto.PREDICTION;
+ return;
}
}
}
- return LauncherLogProto.ALLAPPS;
+ targetParent.containerType = LauncherLogProto.ALLAPPS;
}
}