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

Commit 9cc9e483 authored by HanWang's avatar HanWang
Browse files

Add null pointer judgment processing to prevent restarting



When getDisplayArea() is not default display,there will be a null pointer situation,
to avoid this situation, a null pointer judgment has been added.

Bug:295103280
Test:Stability test

Change-Id: I46c1463bab7889ba0395c67b8bd1ffa1148326cf
Signed-off-by: default avatarHanWang <hanwang627@gmail.com>
parent 7507728a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -5748,7 +5748,7 @@ class Task extends TaskFragment {
                false /* deferResume */);
                false /* deferResume */);


        ActivityRecord topActivity = getDisplayArea().topRunningActivity();
        ActivityRecord topActivity = getDisplayArea().topRunningActivity();
        Task topRootTask = topActivity.getRootTask();
        Task topRootTask = topActivity == null ? null : topActivity.getRootTask();
        if (topRootTask != null && topRootTask != this && topActivity.isState(RESUMED)) {
        if (topRootTask != null && topRootTask != this && topActivity.isState(RESUMED)) {
            // Usually resuming a top activity triggers the next app transition, but nothing's got
            // Usually resuming a top activity triggers the next app transition, but nothing's got
            // resumed in this case, so we need to execute it explicitly.
            // resumed in this case, so we need to execute it explicitly.