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

Commit ae989f01 authored by Nergi Rahardi's avatar Nergi Rahardi Committed by Android (Google) Code Review
Browse files

Merge "Fix DesktopModeWindowDecor crash due to stale task displayId" into main

parents f8142a67 eef5f6e3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ import android.os.Handler;
import android.os.Trace;
import android.os.UserHandle;
import android.util.Size;
import android.util.Slog;
import android.view.Choreographer;
import android.view.Display;
import android.view.InsetsState;
@@ -932,6 +933,11 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
    /** Update the view holder for app header. */
    private void updateAppHeaderViewHolder(boolean inFullImmersive, boolean hasGlobalFocus) {
        if (!isAppHeader(mWindowDecorViewHolder)) return;
        if (mDisplayController.getDisplayLayout(mTaskInfo.displayId) == null) {
            Slog.w(TAG, "Display" + mTaskInfo.displayId
                    + " is not found, task displayId might be stale");
            return;
        }
        asAppHeader(mWindowDecorViewHolder).bindData(new AppHeaderViewHolder.HeaderData(
                mTaskInfo,
                DesktopModeUtils.isTaskMaximized(mTaskInfo, mDisplayController),