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

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

Merge "Fix NPE when trying to access task before AppWindowToken attach to one"

parents 31c84b18 48c0ed08
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1089,6 +1089,12 @@ final class ActivityRecord extends ConfigurationContainer {
            Slog.w(TAG_WM, "Attempted to set icon of non-existing app token: " + appToken);
            return false;
        }
        if (mAppWindowToken.getTask() == null) {
            // Can be removed after unification of Task and TaskRecord.
            Slog.w(TAG_WM, "Attempted to start a window to an app token not having attached to any"
                    + " task: " + appToken);
            return false;
        }
        return mAppWindowToken.addStartingWindow(pkg, theme, compatInfo, nonLocalizedLabel,
                labelRes, icon, logo, windowFlags, transferFrom, newTask, taskSwitch,
                processRunning, allowTaskSnapshot, activityCreated, fromRecents);