Merge "Fix unexpected surface visible after closing animation" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
38b65a1565
@@ -4961,7 +4961,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
*/
|
*/
|
||||||
private void postApplyAnimation(boolean visible, boolean fromTransition) {
|
private void postApplyAnimation(boolean visible, boolean fromTransition) {
|
||||||
final boolean usingShellTransitions = mTransitionController.isShellTransitionsEnabled();
|
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_APP_TRANSITION | ANIMATION_TYPE_WINDOW_ANIMATION
|
||||||
| ANIMATION_TYPE_RECENTS);
|
| ANIMATION_TYPE_RECENTS);
|
||||||
if (!delayed && !usingShellTransitions) {
|
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.STARTED;
|
||||||
import static com.android.server.wm.ActivityRecord.State.STOPPED;
|
import static com.android.server.wm.ActivityRecord.State.STOPPED;
|
||||||
import static com.android.server.wm.ActivityRecord.State.STOPPING;
|
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_INVISIBLE;
|
||||||
import static com.android.server.wm.TaskFragment.TASK_FRAGMENT_VISIBILITY_VISIBLE;
|
import static com.android.server.wm.TaskFragment.TASK_FRAGMENT_VISIBILITY_VISIBLE;
|
||||||
import static com.android.server.wm.TaskFragment.TASK_FRAGMENT_VISIBILITY_VISIBLE_BEHIND_TRANSLUCENT;
|
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.
|
// Because the app is waiting for transition, it should not hide the surface.
|
||||||
assertTrue(app.mActivityRecord.isSurfaceShowing());
|
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) {
|
private void assertHasStartingWindow(ActivityRecord atoken) {
|
||||||
|
|||||||
Reference in New Issue
Block a user