summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2015-10-16 14:57:24 -0700
committerWinson <winsonc@google.com>2015-10-16 14:57:24 -0700
commita49b1f75cdf8efe88408173737a7b3c8f4b58a4c (patch)
treef6b93444372e9480cd943e73795618ef3ac9d724 /src/com/android/launcher3/allapps/AllAppsRecyclerView.java
parente9f27273855d50b54b654ef3a3056136e3f2668b (diff)
downloadandroid_packages_apps_Trebuchet-a49b1f75cdf8efe88408173737a7b3c8f4b58a4c.tar.gz
android_packages_apps_Trebuchet-a49b1f75cdf8efe88408173737a7b3c8f4b58a4c.tar.bz2
android_packages_apps_Trebuchet-a49b1f75cdf8efe88408173737a7b3c8f4b58a4c.zip
Fix issue with source params not reporting predicted apps.
Bug: 25020080 Change-Id: Iaa67ccbb3e3a6c264aaa4fa3c915faad8a69bbbc
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsRecyclerView.java')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsRecyclerView.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index 48b9494b7..1cb03c989 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -25,6 +25,7 @@ import android.util.AttributeSet;
import android.view.View;
import com.android.launcher3.BaseRecyclerView;
+import com.android.launcher3.BubbleTextView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.Stats;
@@ -155,12 +156,25 @@ public class AllAppsRecyclerView extends BaseRecyclerView
}
@Override
- public void fillInLaunchSourceData(Bundle sourceData) {
+ public void fillInLaunchSourceData(View v, Bundle sourceData) {
sourceData.putString(Stats.SOURCE_EXTRA_CONTAINER, Stats.CONTAINER_ALL_APPS);
if (mApps.hasFilter()) {
sourceData.putString(Stats.SOURCE_EXTRA_SUB_CONTAINER,
Stats.SUB_CONTAINER_ALL_APPS_SEARCH);
} else {
+ if (v instanceof BubbleTextView) {
+ BubbleTextView icon = (BubbleTextView) v;
+ int position = getChildPosition(icon);
+ if (position != NO_POSITION) {
+ List<AlphabeticalAppsList.AdapterItem> items = mApps.getAdapterItems();
+ AlphabeticalAppsList.AdapterItem item = items.get(position);
+ if (item.viewType == AllAppsGridAdapter.PREDICTION_ICON_VIEW_TYPE) {
+ sourceData.putString(Stats.SOURCE_EXTRA_SUB_CONTAINER,
+ Stats.SUB_CONTAINER_ALL_APPS_PREDICTION);
+ return;
+ }
+ }
+ }
sourceData.putString(Stats.SOURCE_EXTRA_SUB_CONTAINER,
Stats.SUB_CONTAINER_ALL_APPS_A_Z);
}