Merge "Fix persistent device search edu" into sc-dev am: 564ae64e04

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13419784

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I27875b91cb1928b5bba0f4ed537e7cf1c23d0c16
This commit is contained in:
Hyunyoung Song authored and Automerger Merge Worker committed 2021-01-28 22:43:27 +00:00
commit 056b648136
1 file changed
+7 -2
@@ -27,6 +27,7 @@ import android.content.SharedPreferences;
import com.android.launcher3.LauncherState;
import com.android.launcher3.Workspace;
import com.android.launcher3.allapps.AllAppsInsetTransitionController;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.hybridhotseat.HotseatPredictionController;
import com.android.launcher3.search.DeviceSearchEdu;
@@ -139,8 +140,12 @@ public class QuickstepOnboardingPrefs extends OnboardingPrefs<QuickstepLauncher>
@Override
public void onStateTransitionStart(LauncherState toState) {
if (toState == ALL_APPS) {
mLauncher.getAllAppsController().getInsetController().setSearchEduRunnable(
() -> DeviceSearchEdu.show(launcher));
AllAppsInsetTransitionController insetTransitionController =
mLauncher.getAllAppsController().getInsetController();
insetTransitionController.setSearchEduRunnable(() -> {
DeviceSearchEdu.show(launcher);
insetTransitionController.setSearchEduRunnable(null);
});
stateManager.removeStateListener(this);
}
}