[AA+] Reset search manager when exiting all apps.

This is required to log search session exits properly, especially when exiting AllApps without clearing search query.

Bug: 178562918
Test: Manual
Change-Id: Id4c1007b051e9efd9ae5929c274a70cf3ae3cbf1
This commit is contained in:
thiruram
2021-06-02 16:02:37 -07:00
committed by Thiru Ramasamy
parent 26ab4621ce
commit ea56f849c2
+2 -1
View File
@@ -1076,9 +1076,10 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
getRotationHelper().setCurrentStateRequest(REQUEST_NONE);
}
if (mPrevLauncherState != state && !ALL_APPS.equals(state)
if (ALL_APPS.equals(mPrevLauncherState) && !ALL_APPS.equals(state)
// Making sure mAllAppsSessionLogId is not null to avoid double logging.
&& mAllAppsSessionLogId != null) {
getAppsView().getSearchUiManager().resetSearch();
getStatsLogManager().logger().log(LAUNCHER_ALLAPPS_EXIT);
mAllAppsSessionLogId = null;
}