From 6600860f0f9ce177f1a3448481ea772eb25b2c01 Mon Sep 17 00:00:00 2001 From: thiruram Date: Thu, 11 Feb 2021 15:23:32 -0800 Subject: [PATCH] [AA+] Log app launches with AllApps session InstanceId when current state is ALL_APPS. Bug: 178562918 Test: Manual Change-Id: I65b264cc37079280b59179d5b2f29b67e7a12cc5 --- .../launcher3/uioverrides/QuickstepLauncher.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 2e018f357f..8b4f4f87af 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -21,12 +21,11 @@ import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION; import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT; import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT; +import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK; import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent; -import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.EXTENDED_CONTAINERS; -import static com.android.launcher3.logger.LauncherAtomExtensions.ExtendedContainers.ContainerCase.DEVICE_SEARCH_RESULT_CONTAINER; import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP; import static com.android.launcher3.testing.TestProtocol.HINT_STATE_ORDINAL; import static com.android.launcher3.testing.TestProtocol.OVERVIEW_STATE_ORDINAL; @@ -105,12 +104,11 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { @Override protected void logAppLaunch(ItemInfo info, InstanceId instanceId) { - // If the app launch is from DeviceSearchResultContainer then add the InstanceId from - // LiveSearchManager to recreate the AllApps search session on the server side. + // If the app launch is from any of the surfaces in AllApps then add the InstanceId from + // LiveSearchManager to recreate the AllApps session on the server side. Optional logInstanceId = this.getLiveSearchManager().getLogInstanceId(); - if (info.getContainerInfo().getContainerCase() == EXTENDED_CONTAINERS - && info.getContainerInfo().getExtendedContainers().getContainerCase() - == DEVICE_SEARCH_RESULT_CONTAINER && logInstanceId.isPresent()) { + if (logInstanceId.isPresent() && ALL_APPS.equals( + getStateManager().getCurrentStableState())) { instanceId = logInstanceId.get(); }