diff options
author | Winson Chung <winsonc@google.com> | 2015-05-28 17:33:40 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-06-02 16:58:30 -0700 |
commit | 8f1eff7b6cc8621888ee46605c32e601f80a890b (patch) | |
tree | e146630fbd97be40814eb573a8b5aac5c0e0d00d /src/com/android/launcher3/allapps/AllAppsRecyclerView.java | |
parent | 316490e636aad788fcfbfc2e04dd4f0e145bdd00 (diff) | |
download | android_packages_apps_Trebuchet-8f1eff7b6cc8621888ee46605c32e601f80a890b.tar.gz android_packages_apps_Trebuchet-8f1eff7b6cc8621888ee46605c32e601f80a890b.tar.bz2 android_packages_apps_Trebuchet-8f1eff7b6cc8621888ee46605c32e601f80a890b.zip |
Adding context for app launches.
Bug: 21492784
Change-Id: I1b28ac8f44498e1d9770e770b074f19c721c3f10
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsRecyclerView.java')
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsRecyclerView.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java index cc5add3b2..e1b5d918e 100644 --- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java +++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java @@ -18,14 +18,15 @@ package com.android.launcher3.allapps; import android.content.Context; import android.graphics.Rect; import android.graphics.drawable.Drawable; +import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.View; - import com.android.launcher3.BaseRecyclerView; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; +import com.android.launcher3.Stats; import com.android.launcher3.Utilities; import java.util.List; @@ -33,7 +34,8 @@ import java.util.List; /** * A RecyclerView with custom fast scroll support for the all apps view. */ -public class AllAppsRecyclerView extends BaseRecyclerView { +public class AllAppsRecyclerView extends BaseRecyclerView + implements Stats.LaunchSourceProvider { private AlphabeticalAppsList mApps; private int mNumAppsPerRow; @@ -125,6 +127,18 @@ public class AllAppsRecyclerView extends BaseRecyclerView { addOnItemTouchListener(this); } + @Override + public void fillInLaunchSourceData(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 { + sourceData.putString(Stats.SOURCE_EXTRA_SUB_CONTAINER, + Stats.SUB_CONTAINER_ALL_APPS_A_Z); + } + } + /** * Maps the touch (from 0..1) to the adapter position that should be visible. */ |