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
This commit is contained in:
Becky
2019-07-11 13:54:03 -07:00
parent f11dd8e107
commit 8874e5f8a7

View File

@@ -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