Merge "Fix unexpected surface visible after closing animation" into sc-v2-dev am: 38b65a1565
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16081870 Change-Id: I4bfa861a7db6f6b7c40d6a4b17824479f4921929
This commit is contained in:
@@ -4961,7 +4961,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
*/
|
||||
private void postApplyAnimation(boolean visible, boolean fromTransition) {
|
||||
final boolean usingShellTransitions = mTransitionController.isShellTransitionsEnabled();
|
||||
final boolean delayed = isAnimating(TRANSITION | PARENTS | CHILDREN,
|
||||
final boolean delayed = isAnimating(PARENTS | CHILDREN,
|
||||
ANIMATION_TYPE_APP_TRANSITION | ANIMATION_TYPE_WINDOW_ANIMATION
|
||||
| ANIMATION_TYPE_RECENTS);
|
||||
if (!delayed && !usingShellTransitions) {
|
||||
|
||||
@@ -77,6 +77,7 @@ import static com.android.server.wm.ActivityRecord.State.RESUMED;
|
||||
import static com.android.server.wm.ActivityRecord.State.STARTED;
|
||||
import static com.android.server.wm.ActivityRecord.State.STOPPED;
|
||||
import static com.android.server.wm.ActivityRecord.State.STOPPING;
|
||||
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
|
||||
import static com.android.server.wm.TaskFragment.TASK_FRAGMENT_VISIBILITY_INVISIBLE;
|
||||
import static com.android.server.wm.TaskFragment.TASK_FRAGMENT_VISIBILITY_VISIBLE;
|
||||
import static com.android.server.wm.TaskFragment.TASK_FRAGMENT_VISIBILITY_VISIBLE_BEHIND_TRANSLUCENT;
|
||||
@@ -3026,6 +3027,10 @@ public class ActivityRecordTests extends WindowTestsBase {
|
||||
|
||||
// Because the app is waiting for transition, it should not hide the surface.
|
||||
assertTrue(app.mActivityRecord.isSurfaceShowing());
|
||||
|
||||
// Ensure onAnimationFinished will callback when the closing animation is finished.
|
||||
verify(app.mActivityRecord).onAnimationFinished(eq(ANIMATION_TYPE_APP_TRANSITION),
|
||||
eq(null));
|
||||
}
|
||||
|
||||
private void assertHasStartingWindow(ActivityRecord atoken) {
|
||||
|
||||
Reference in New Issue
Block a user