From 43700f61f70660ade0177efafdec37746be9082e Mon Sep 17 00:00:00 2001 From: Mike Schneider Date: Wed, 22 Mar 2023 10:58:01 +0100 Subject: [PATCH] Ensure FLAG_IN_APP is correctly set after launcher-restart. This is a follow-up to ag/21699905, which caused the nav-bar to be visible after a device-restart alongside the hotseat, until an app was launched. Currently, when restarting launcher (for example a device restart), there is no guarantee when the SysUI flags are received for the first time. The current init-codepath expects the launcher to be fully initialized at the time. From there, only deltas are processed: - during the initial resume, launcher is not considered active because the screen is still off - the SCREEN_ON event itself is not processed to update the FLAG_IN_APP Before: http://shortn/_MGQjGFRIaB After: http://shortn/_awiv2CxFn9 Bug: 261418621 Test: manual (http://shortn/_ty9EDuLM97), tapl Change-Id: Ie3b3ba1ebe249efe8fc43850052bc9956cafcd24 --- .../launcher3/taskbar/TaskbarLauncherStateController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index a6c38dab87..9adbd7f415 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -377,7 +377,7 @@ public class TaskbarLauncherStateController { } } - if (hasAnyFlag(changedFlags, FLAGS_LAUNCHER_ACTIVE)) { + if (hasAnyFlag(changedFlags, FLAGS_LAUNCHER_ACTIVE | FLAG_SCREEN_ON)) { animatorSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) {