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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user