Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ab25b56 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Ensure some taskbar states are initialized correctly" into sc-v2-dev am: 9b3b2b9c

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

Change-Id: Iaf93223818db835484845e519269d5b9ad47bf6f
parents 76cb3a5c 9b3b2b9c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -111,6 +111,11 @@ import java.util.function.Supplier;
        onIconAlignmentRatioChangedForAppAndHomeTransition();

        mLauncher.getStateManager().addStateListener(mStateListener);

        // Initialize to the current launcher state
        updateStateForFlag(FLAG_RESUMED, launcher.hasBeenResumed());
        mLauncherState = launcher.getStateManager().getState();
        applyState(0);
    }

    public void onDestroy() {
+6 −2
Original line number Diff line number Diff line
@@ -171,9 +171,13 @@ public class TaskbarStashController {

        boolean isManuallyStashedInApp = supportsManualStashing()
                && mPrefs.getBoolean(SHARED_PREFS_STASHED_KEY, DEFAULT_STASHED_PREF);
        boolean isInSetup = !mActivity.isUserSetupComplete() || sharedState.setupUIVisible;
        updateStateForFlag(FLAG_STASHED_IN_APP_MANUAL, isManuallyStashedInApp);
        updateStateForFlag(FLAG_STASHED_IN_APP_SETUP,
                !mActivity.isUserSetupComplete() || sharedState.setupUIVisible);
        updateStateForFlag(FLAG_STASHED_IN_APP_SETUP, isInSetup);
        if (isInSetup) {
            // Update the in-app state to ensure isStashed() reflects right state during SUW
            updateStateForFlag(FLAG_IN_APP, true);
        }
        applyState();

        notifyStashChange(/* visible */ false, /* stashed */ isStashedInApp());