diff options
| author | 2023-05-08 14:21:08 -0700 | |
|---|---|---|
| committer | 2023-05-08 14:21:08 -0700 | |
| commit | 6749d0ba90525cd91f96cd83f092c26dfeb322bd (patch) | |
| tree | 7ca9f4ffeda1133d662bfd36cfdd35124cd52f88 | |
| parent | 05a834b1d84b25138a8033ac47492b98d11ac53b (diff) | |
Start tracking unknownvisibility immediately for launchBehind
Previously, we only started tracking unknownVisibility in
`realStartActivity` which happens after completePause. This is
too late since there can be an arbitrary amount of time before
we get pause and launchBehind apps lifetime shouldn't be
tied to a different task anyways. This CL starts tracking it
on start so that the transition system doesn't interpret it
as syncFinished before we know if it will be visible or not.
Bug: 277759491
Test: Launch home from dream multiple times.
Change-Id: Ifabc089e396717565d351139d761bb967c8946ae
| -rw-r--r-- | services/core/java/com/android/server/wm/Task.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 931c2580fa3f..b7c29bf071d8 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -5170,6 +5170,12 @@ class Task extends TaskFragment { // task. r.setVisibility(true); ensureActivitiesVisible(null, 0, !PRESERVE_WINDOWS); + // If launching behind, the app will start regardless of what's above it, so mark it + // as unknown even before prior `pause`. This also prevents a race between set-ready + // and activityPause. Launch-behind is basically only used for dream now. + if (!r.isVisibleRequested()) { + r.notifyUnknownVisibilityLaunchedForKeyguardTransition(); + } // Go ahead to execute app transition for this activity since the app transition // will not be triggered through the resume channel. mDisplayContent.executeAppTransition(); |