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

Commit 5f7884b3 authored by lijilou's avatar lijilou Committed by Jilou li
Browse files

TaskDisplayArea: fix NPE problem.

The getOrCreateRootHomeTask method  return value is Nullable ,so we should make NonNull judgment before use the return value.

Test: OEM monkey test
Flag: EXEMPT bugfix
Bug: 386025825
Change-Id: I7efc57e94a3cdaf1db27fb696a975e194e86d8a3
parent 6407e3b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -843,7 +843,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {
     */
    void positionTaskBehindHome(Task task) {
        final Task home = getOrCreateRootHomeTask();
        final WindowContainer homeParent = home.getParent();
        final WindowContainer homeParent = home != null ? home.getParent() : null;
        final Task homeParentTask = homeParent != null ? homeParent.asTask() : null;
        if (homeParentTask == null) {
            // reparent throws if parent didn't change...