Merge "Wait for next app to be visible if current activity is marked visible" into nyc-dev

am: 98afb34

* commit '98afb342df74a657e69a478b5ace19450b579660':
  Wait for next app to be visible if current activity is marked visible

Change-Id: I6fa1dd67f8bff23596277d3c55869961ffa6b220
This commit is contained in:
Chong Zhang
2016-04-25 21:26:57 +00:00
committed by android-build-merger

View File

@@ -3457,7 +3457,7 @@ final class ActivityStack {
// First things first: if this activity is currently visible,
// and the resumed activity is not yet visible, then hold off on
// finishing until the resumed one becomes visible.
if (mode == FINISH_AFTER_VISIBLE && r.nowVisible) {
if (mode == FINISH_AFTER_VISIBLE && (r.visible || r.nowVisible)) {
if (!mStackSupervisor.mStoppingActivities.contains(r)) {
addToStopping(r, false /* immediate */);
}