diff options
| author | 2016-04-22 11:31:51 -0700 | |
|---|---|---|
| committer | 2016-04-22 18:50:28 +0000 | |
| commit | 4c5f7ff42eda45be5f20a7dd981a9f064d8fb01d (patch) | |
| tree | 47c58d32f133ba714e85fed0fcf76c2cc55a9f80 | |
| parent | 9ef0ce1749e626a47d669a3f4b059ba748d2e69e (diff) | |
Fix black frame in finishing transition
If either visible or nowVisible is true we need to wait for next
activity to become visible before we destroy the previous activity.
In some code path (eg. clear task top), when starting a new activity,
old activity is first paused and visible set to false with a dummy
transition set. Then finish activity is requested. At this point visible
is already false, but nowVisible is true. We still need to wait for
next app become visible to avoid a black frame shown in between.
bug: 27796252
Change-Id: Ief3d5fc8f11c51a729c424f996ab2597c815e4dd
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityStack.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index 06d6430041aa..3df4a61a3dbf 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -3434,8 +3434,8 @@ final class ActivityStack { mWindowManager.executeAppTransition(); mStackSupervisor.mWaitingVisibleActivities.add(r); } - return finishCurrentActivityLocked(r, - r.visible ? FINISH_AFTER_VISIBLE : FINISH_AFTER_PAUSE, oomAdj) == null; + return finishCurrentActivityLocked(r, (r.visible || r.nowVisible) ? + FINISH_AFTER_VISIBLE : FINISH_AFTER_PAUSE, oomAdj) == null; } else { if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Finish waiting for pause of: " + r); } |