Sending broadcast message when home screen is ready.
There is a lag between Pixel/Phone is starting message is displayed and when the home screen is actually ready. The lag is visible in low-end devices like JioPhone Next. To solve that a broadcast message is sent from QuickstepLauncher class when the UI is ready.
Bug: 199120420
Test: manual - tested on the device
Change-Id: I18628552a1513454127ef2f8ad5acd711d9015e6
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
index 9050ddc..72195a0 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -68,9 +68,11 @@
import com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController;
import com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController;
import com.android.launcher3.uioverrides.touchcontrollers.TwoButtonNavbarTouchController;
+import com.android.launcher3.util.IntSet;
import com.android.launcher3.util.ItemInfoMatcher;
import com.android.launcher3.util.OnboardingPrefs;
import com.android.launcher3.util.PendingRequestArgs;
+import com.android.launcher3.util.RunnableList;
import com.android.launcher3.util.TouchController;
import com.android.launcher3.util.UiThreadHelper;
import com.android.launcher3.util.UiThreadHelper.AsyncCommand;
@@ -91,6 +93,8 @@
public class QuickstepLauncher extends BaseQuickstepLauncher {
+ public static final String HOME_IS_READY = "com.android.launcher3.HOME_IS_READY";
+
public static final boolean GO_LOW_RAM_RECENTS_ENABLED = false;
/**
* Reusable command for applying the shelf height on the background thread.
@@ -232,6 +236,12 @@
}
@Override
+ public void onInitialBindComplete(IntSet boundPages, RunnableList pendingTasks) {
+ super.onInitialBindComplete(boundPages, pendingTasks);
+ sendBroadcast(new Intent(HOME_IS_READY).setPackage("com.android.settings"));
+ }
+
+ @Override
public void bindExtraContainerItems(FixedContainerItems item) {
if (item.containerId == Favorites.CONTAINER_PREDICTION) {
mAllAppsPredictions = item;