Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51335db6 authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

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

am: e9f5d365

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

Change-Id: If1a902d4fb7ebfa5d2b08ab495195f7e90e20340
parents db607a6c e9f5d365
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -1752,6 +1752,9 @@ final class ActivityStack {
                        }
                        }
                    } else if (r.visible) {
                    } else if (r.visible) {
                        // If this activity is already visible, then there is nothing to do here.
                        // 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)) {
                        if (handleAlreadyVisible(r)) {
                            resumeNextActivity = false;
                            resumeNextActivity = false;
                        }
                        }
@@ -1933,8 +1936,6 @@ final class ActivityStack {
            r.sleeping = false;
            r.sleeping = false;
            r.app.pendingUiClean = true;
            r.app.pendingUiClean = true;
            r.app.thread.scheduleWindowVisibility(r.appToken, true);
            r.app.thread.scheduleWindowVisibility(r.appToken, true);
            r.stopFreezingScreenLocked(false);

            // The activity may be waiting for stop, but that is no longer
            // The activity may be waiting for stop, but that is no longer
            // appropriate for it.
            // appropriate for it.
            mStackSupervisor.mStoppingActivities.remove(r);
            mStackSupervisor.mStoppingActivities.remove(r);
@@ -1944,10 +1945,10 @@ final class ActivityStack {
            // visible when it next restarts.
            // visible when it next restarts.
            Slog.w(TAG, "Exception thrown making visibile: " + r.intent.getComponent(), e);
            Slog.w(TAG, "Exception thrown making visibile: " + r.intent.getComponent(), e);
        }
        }
        handleAlreadyVisible(r);
    }
    }


    private boolean handleAlreadyVisible(ActivityRecord r) {
    private boolean handleAlreadyVisible(ActivityRecord r) {
        if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Skipping: already visible at " + r);
        r.stopFreezingScreenLocked(false);
        r.stopFreezingScreenLocked(false);
        try {
        try {
            if (r.returningOptions != null) {
            if (r.returningOptions != null) {