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

Commit 906e6595 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Attempt to preload the Launcher activity when the user reaches the All...

Merge "Attempt to preload the Launcher activity when the user reaches the All Set Page." into tm-dev am: 9557b10c am: 60273b85 am: 6687578d

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



Change-Id: I240c5d6d2da0aec243f8bbeee682588290e17fdb
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0939c91c 6687578d
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -268,6 +268,16 @@ public class TouchInteractionService extends Service
            MAIN_EXECUTOR.execute(ProxyScreenStatusProvider.INSTANCE::onScreenTurnedOn);
        }

        /**
         * Preloads the Overview activity.
         *
         * This method should only be used when the All Set page of the SUW is reached to safely
         * preload the Launcher for the SUW first reveal.
         */
        public void preloadOverviewForSUWAllSet() {
            preloadOverview(false, true);
        }

        @Override
        public void onRotationProposal(int rotation, boolean isValid) {
            executeForTaskbarManager(() -> mTaskbarManager.onRotationProposal(rotation, isValid));
@@ -883,6 +893,10 @@ public class TouchInteractionService extends Service
    }

    private void preloadOverview(boolean fromInit) {
        preloadOverview(fromInit, false);
    }

    private void preloadOverview(boolean fromInit, boolean forSUWAllSet) {
        if (!mDeviceState.isUserUnlocked()) {
            return;
        }
@@ -892,7 +906,8 @@ public class TouchInteractionService extends Service
            return;
        }

        if (RestoreDbTask.isPending(this) || !mDeviceState.isUserSetupComplete()) {
        if ((RestoreDbTask.isPending(this) && !forSUWAllSet)
                || !mDeviceState.isUserSetupComplete()) {
            // Preloading while a restore is pending may cause launcher to start the restore
            // too early.
            return;
+1 −0
Original line number Diff line number Diff line
@@ -208,6 +208,7 @@ public class AllSetActivity extends Activity {
        mBinder = binder;
        mBinder.getTaskbarManager().setSetupUIVisible(isResumed());
        mBinder.setSwipeUpProxy(isResumed() ? this::createSwipeUpProxy : null);
        mBinder.preloadOverviewForSUWAllSet();
    }

    @Override