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

This commit is contained in:
Chong Zhang
2016-04-25 21:13:27 +00:00
committed by Android (Google) Code Review

View File

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