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

Commit 0bcc0475 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Prevent NPE while finishing activity" into rvc-dev am: 1dbee3e3 am: b9bd2da6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11788494

Change-Id: Ic2270be05f1acc7f2b24da4a421fd7865f7ec1e2
parents 8aa51da2 b9bd2da6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1685,6 +1685,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        final NeededUriGrants resultGrants = collectGrants(resultData, r.resultTo);

        synchronized (mGlobalLock) {
            // Sanity check in case activity was removed before entering global lock.
            if (!r.isInHistory()) {
                return true;
            }

            // Keep track of the root activity of the task before we finish it
            final Task tr = r.getTask();
            final ActivityRecord rootR = tr.getRootActivity();