Fix a small bug around deferring activity visibility

Making the defer specific to the activity instead of "while
transition running". Otherwise, we can break changes in
visibility that don't occur during a transition while a
transition is running (eg. an app becoming visible due to
an on-top app changing translucency).

Bug: 183993924
Test: atest ActivityVisibilityTests#testConvertTranslucentOnNonTopTranslucentActivity
Change-Id: I1589b4d47733ed4182e1e7b5b10fe7957b8dceea
This commit is contained in:
Evan Rosky
2021-06-01 10:32:49 -07:00
parent ffac171d4d
commit ecaff118fb

View File

@@ -4567,7 +4567,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
// If in a transition, defer commits for activities that are going invisible
if (!visible && mAtmService.getTransitionController().inTransition()) {
if (!visible && mAtmService.getTransitionController().inTransition(this)) {
return;
}
// If we are preparing an app transition, then delay changing