From f0be4fa5730e34ccdc1651071017b5d9444d4bc9 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Mon, 24 Jul 2023 15:55:19 -0700 Subject: [PATCH] Use hasBeenResumed() for checking if launcher is resumed ag/23852178 introduced a clean up for launcher state when invoking transient taskbar. It was checking launcher activity resumed state with `isResumed()` method. This breaks transient taskbar for desktop mode as we are marking the launcher activity to be paused using the launcher flags. `hasBeenResumed()` method is the one we can used instead as it is checking the launcher flags and not the resumed state of the activity itself. Bug: 292266259 Test: open transparent activity on top of launcher unstash taskbar go home Test: move an app to desktop, unstash taskbar Change-Id: I98d14dbfdde4b857f50e62206fc0f308e8f54231 --- .../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 296e0db9d1..90f7beaf9c 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -204,7 +204,7 @@ public class TaskbarLauncherStateController { updateStateForFlag(FLAG_LAUNCHER_IN_STATE_TRANSITION, false); // TODO(b/279514548) Cleans up bad state that can occur when user interacts with // taskbar on top of transparent activity. - if (finalState == LauncherState.NORMAL && mLauncher.isResumed()) { + if (finalState == LauncherState.NORMAL && mLauncher.hasBeenResumed()) { updateStateForFlag(FLAG_RESUMED, true); } applyState();