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

Commit e3719bdc authored by Louis Chang's avatar Louis Chang
Browse files

Remove unnecessary check and prevent unnecessary log

.. while getting a valid root task.

Bug: 184806710
Test: wm presubmit
Change-Id: I8d6a0f5f928dffec4f2371988c5807aad370289b
parent fdd691c3
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -2686,11 +2686,8 @@ class ActivityStarter {
                // launched into the same root task.
                mTargetRootTask = Task.fromWindowContainerToken(mSourceRecord.mLaunchRootTask);
            } else {
                final Task rootTask =
                        getOrCreateRootTask(mStartActivity, mLaunchFlags, intentTask, mOptions);
                // TODO(b/184806710): #getOrCreateRootTask should never return null?
                mTargetRootTask =
                        rootTask != null ? rootTask : intentActivity.getRootTask();
                mTargetRootTask = getOrCreateRootTask(mStartActivity, mLaunchFlags, intentTask,
                        mOptions);
            }
        }

+1 −1
Original line number Diff line number Diff line
@@ -2754,7 +2754,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
        // First preference goes to the launch root task set in the activity options.
        if (options != null) {
            final Task candidateRoot = Task.fromWindowContainerToken(options.getLaunchRootTask());
            if (canLaunchOnDisplay(r, candidateRoot)) {
            if (candidateRoot != null && canLaunchOnDisplay(r, candidateRoot)) {
                return candidateRoot;
            }
        }