Merge "Deliver new activity options after the activity is made visible" into nyc-dev am: e9f5d365bb

am: 51335db632

* commit '51335db63290927550a242faa167cbc138ce6f5c':
  Deliver new activity options after the activity is made visible

Change-Id: I31068eef755e82f3e9e1e5cb00855012f727789a
This commit is contained in:
Chong Zhang
2016-05-11 22:19:08 +00:00
committed by android-build-merger

View File

@@ -1752,6 +1752,9 @@ final class ActivityStack {
}
} else if (r.visible) {
// If this activity is already visible, then there is nothing to do here.
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY,
"Skipping: already visible at " + r);
if (handleAlreadyVisible(r)) {
resumeNextActivity = false;
}
@@ -1933,8 +1936,6 @@ final class ActivityStack {
r.sleeping = false;
r.app.pendingUiClean = true;
r.app.thread.scheduleWindowVisibility(r.appToken, true);
r.stopFreezingScreenLocked(false);
// The activity may be waiting for stop, but that is no longer
// appropriate for it.
mStackSupervisor.mStoppingActivities.remove(r);
@@ -1944,10 +1945,10 @@ final class ActivityStack {
// visible when it next restarts.
Slog.w(TAG, "Exception thrown making visibile: " + r.intent.getComponent(), e);
}
handleAlreadyVisible(r);
}
private boolean handleAlreadyVisible(ActivityRecord r) {
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Skipping: already visible at " + r);
r.stopFreezingScreenLocked(false);
try {
if (r.returningOptions != null) {