Merge "Fix black frame in finishing transition" into nyc-dev
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 06d6430..3df4a61 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 @@
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);
}