From 8874e5f8a7d575341b1ec34d3f16b624e615834b Mon Sep 17 00:00:00 2001 From: Becky Date: Thu, 11 Jul 2019 13:54:03 -0700 Subject: Fill the logging container in the AllAppsContainerView This would fix the issue that when drag and drop an icon from the all apps page, it doesn't have the right container information logged. Logging after this fix: 07-11 10:57:04.392 12969 12969 D UserEvent: action:DRAGDROP 07-11 10:57:04.392 12969 12969 D UserEvent: Source child:APP_ICON parent:ALLAPPS 07-11 10:57:04.392 12969 12969 D UserEvent: Destination child:APP_ICON parent:WORKSPACE id=0 07-11 10:57:04.392 12969 12969 D UserEvent: Elapsed container 744 ms, session 17440 ms, action 739 ms Test: manual Bug: 111935715 Change-Id: Ifb078e57697b051e3a527c16abaad40663eae687 --- src/com/android/launcher3/allapps/AllAppsContainerView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index ea9b077c6..b279cfc0b 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -50,6 +50,7 @@ import com.android.launcher3.Utilities; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.keyboard.FocusedItemDecorator; +import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.userevent.nano.LauncherLogProto.Target; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.MultiValueAlpha; @@ -297,7 +298,11 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo @Override public void fillInLogContainerData(View v, ItemInfo info, Target target, Target targetParent) { - // This is filled in {@link AllAppsRecyclerView} + if (getApps().hasFilter()) { + targetParent.containerType = ContainerType.SEARCHRESULT; + } else { + targetParent.containerType = ContainerType.ALLAPPS; + } } @Override -- cgit v1.2.3