From edd5f77c51f58dd923e4bbff1b86171bfeb501da Mon Sep 17 00:00:00 2001 From: My Name Date: Tue, 2 Nov 2021 12:22:58 +0000 Subject: [PATCH] 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 --- .../launcher3/uioverrides/QuickstepLauncher.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 9050ddc511..72195a0512 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.StatusBarTouchControll 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 @@ import java.util.stream.Stream; 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. @@ -231,6 +235,12 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { } } + @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) {