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

Commit 02a2190e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add Null check in AppWindowToken.onDisplayChanged."

parents b3c1ad2b bf84464a
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1081,11 +1081,15 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        super.onDisplayChanged(dc);
        if (prevDc != null && prevDc.mFocusedApp == this) {
            prevDc.setFocusedApp(null);
            if (dc.getTopStack().getTopChild().getTopChild() == this) {
            final TaskStack stack = dc.getTopStack();
            if (stack != null) {
                final Task task = stack.getTopChild();
                if (task != null && task.getTopChild() == this) {
                    dc.setFocusedApp(this);
                }
            }
        }
    }

    /**
     * Freezes the task bounds. The size of this task reported the app will be fixed to the bounds