diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-07-19 20:30:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-07-19 20:30:44 +0000 |
commit | 4426b1d27f120236fc994743178e73e2647255bc (patch) | |
tree | fe1e0ec918c105bfbbec8ce98bd905b97c9039f9 /src/com/android/launcher3/allapps | |
parent | 5be36b49418504426c74da208d0f87898d993c51 (diff) | |
parent | 2b50b53183b8163744248c0001ea93f61570ed7b (diff) | |
download | android_packages_apps_Trebuchet-4426b1d27f120236fc994743178e73e2647255bc.tar.gz android_packages_apps_Trebuchet-4426b1d27f120236fc994743178e73e2647255bc.tar.bz2 android_packages_apps_Trebuchet-4426b1d27f120236fc994743178e73e2647255bc.zip |
Merge "Updating UserEventDispatcher to make some methods accessible." into ub-launcher3-dorval-polish
Diffstat (limited to 'src/com/android/launcher3/allapps')
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsContainerView.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsRecyclerView.java | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index ccef4f2f5..20951921c 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -359,7 +359,7 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc @Override public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) { - targetParent.containerType = mAppsRecyclerView.getContainerType(v); + // This is filled in {@link AllAppsRecyclerView} } @Override diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java index fb785fbb0..25144584e 100644 --- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java +++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java @@ -30,18 +30,21 @@ import android.view.View; import com.android.launcher3.BaseRecyclerView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.DeviceProfile; +import com.android.launcher3.ItemInfo; import com.android.launcher3.R; import com.android.launcher3.anim.SpringAnimationHandler; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.graphics.DrawableFactory; +import com.android.launcher3.logging.UserEventDispatcher.LogContainerProvider; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; +import com.android.launcher3.userevent.nano.LauncherLogProto.Target; 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 LogContainerProvider { private AlphabeticalAppsList mApps; private AllAppsFastScrollHelper mFastScrollHelper; @@ -231,9 +234,10 @@ public class AllAppsRecyclerView extends BaseRecyclerView { updateEmptySearchBackgroundBounds(); } - public int getContainerType(View v) { + @Override + public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) { if (mApps.hasFilter()) { - return ContainerType.SEARCHRESULT; + targetParent.containerType = ContainerType.SEARCHRESULT; } else { if (v instanceof BubbleTextView) { BubbleTextView icon = (BubbleTextView) v; @@ -242,11 +246,13 @@ 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 ContainerType.PREDICTION; + targetParent.containerType = ContainerType.PREDICTION; + target.predictedRank = item.rowAppIndex; + return; } } } - return ContainerType.ALLAPPS; + targetParent.containerType = ContainerType.ALLAPPS; } } |