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

Commit 85018d53 authored by charlesccchen@google.com's avatar charlesccchen@google.com
Browse files

Fix NPE in RunningTasks#getTasks

Test: presubmit
Bug: 220166475
Change-Id: If2d049addb67f7582c1837fb823b21dcafcd9608
parent de4a9a6a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -82,7 +82,8 @@ class RunningTasks {
        mRecentTasks = root.mService.getRecentTasks();
        mKeepIntentExtra = (flags & FLAG_KEEP_INTENT_EXTRA) == FLAG_KEEP_INTENT_EXTRA;

        if (mTopDisplayFocusRootTask.getAdjacentTaskFragment() != null) {
        if (mTopDisplayFocusRootTask != null
                && mTopDisplayFocusRootTask.getAdjacentTaskFragment() != null) {
            mTopDisplayAdjacentTask = mTopDisplayFocusRootTask.getAdjacentTaskFragment().asTask();
        } else {
            mTopDisplayAdjacentTask = null;