summaryrefslogtreecommitdiff
path: root/quickstep/src
diff options
context:
space:
mode:
authorSchneider Victor-tulias <victortulias@google.com>2022-05-16 14:08:47 -0700
committerSchneider Victor-tulias <victortulias@google.com>2022-05-25 10:02:20 -0700
commit3efef1ce5a8037c037062676272c151b20dcf69e (patch)
tree3d4d145d0cfdd237433e9b2a2d3ccd33e3eae0c3 /quickstep/src
parent4608bd00dc51a8ac571454aaf85a7eddc73e9ec6 (diff)
downloadLauncher3-3efef1ce5a8037c037062676272c151b20dcf69e.tar.gz
Attempt to preload the Launcher activity when the user reaches the All Set Page.
Preloading the Launcher activity once the user reaches the SUW All Set app allows for a smoother first reveal transition. Refactored TIS and TISBinder to make this possible. Fixes: 226726244 Test: factory reset and flashed a build onto a pixel 6 pro Change-Id: I1be3383bafdde17b951329de4c7d6b87affd210c
Diffstat (limited to 'quickstep/src')
-rw-r--r--quickstep/src/com/android/quickstep/TouchInteractionService.java17
-rw-r--r--quickstep/src/com/android/quickstep/interaction/AllSetActivity.java1
2 files changed, 17 insertions, 1 deletions
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index f2583fb2c0..16f141b17b 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -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;
diff --git a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
index a379aada4a..caf61c790e 100644
--- a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
@@ -202,6 +202,7 @@ public class AllSetActivity extends Activity {
mBinder = binder;
mBinder.getTaskbarManager().setSetupUIVisible(isResumed());
mBinder.setSwipeUpProxy(isResumed() ? this::createSwipeUpProxy : null);
+ mBinder.preloadOverviewForSUWAllSet();
}
@Override