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: I36e1b1eda749c6ed9432a65201e800ea4232ecdf
This commit is contained in:
Hyunyoung Song authored and Automerger Merge Worker committed 2021-01-28 22:44:57 +00:00
commit 5bcf120acd
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);
}
}