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(); }