mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Merge "Attempt to preload the Launcher activity when the user reaches the All Set Page." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9557b10c59
@@ -264,6 +264,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));
|
||||
@@ -865,6 +875,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;
|
||||
}
|
||||
@@ -874,7 +888,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;
|
||||
|
||||
@@ -202,6 +202,7 @@ public class AllSetActivity extends Activity {
|
||||
mBinder = binder;
|
||||
mBinder.getTaskbarManager().setSetupUIVisible(isResumed());
|
||||
mBinder.setSwipeUpProxy(isResumed() ? this::createSwipeUpProxy : null);
|
||||
mBinder.preloadOverviewForSUWAllSet();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user