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

Commit 2f5d3e9f authored by 张倞诚's avatar 张倞诚
Browse files

Fixed device restart caused by starting Activity under split-screen root task.

The root task used for split screen contains two or more sub-tasks. In this case, the activity should not be allowed to be started under the root task, which will cause a null pointer and cause the device to restart. Therefore, when the activity is started by specifying the taskid, check that the task is leaftask.

Change-Id: I095feb549ce2d3a4e61d999a342f64bea8264288
parent 9f83523d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2643,7 +2643,7 @@ class ActivityStarter {
        // If a target task is specified, try to reuse that one
        if (mOptions != null && mOptions.getLaunchTaskId() != INVALID_TASK_ID) {
            Task launchTask = mRootWindowContainer.anyTaskForId(mOptions.getLaunchTaskId());
            if (launchTask != null) {
            if (launchTask != null && launchTask.isLeafTask()) {
                return launchTask;
            }
            return null;