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

Commit 647dbb62 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Preventing TaskSnapshotWindow crash from resized." into main

parents 9e5275be bcfd8ea0
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -135,7 +135,6 @@ public class TaskSnapshotWindow {
        } catch (RemoteException e) {
            snapshotSurface.clearWindowSynced();
        }
        window.setOuter(snapshotSurface);
        try {
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "TaskSnapshot#relayout");
            session.relayout(window, layoutParams, -1, -1, View.VISIBLE, 0, 0, 0,
@@ -161,7 +160,7 @@ public class TaskSnapshotWindow {
            ShellExecutor splashScreenExecutor) {
        mSplashScreenExecutor = splashScreenExecutor;
        mSession = WindowManagerGlobal.getWindowSession();
        mWindow = new Window();
        mWindow = new Window(this);
        mWindow.setSession(mSession);
        int backgroundColor = taskDescription.getBackgroundColor();
        mBackgroundPaint.setColor(backgroundColor != 0 ? backgroundColor : WHITE);
@@ -204,9 +203,9 @@ public class TaskSnapshotWindow {
    }

    static class Window extends BaseIWindow {
        private WeakReference<TaskSnapshotWindow> mOuter;
        private final WeakReference<TaskSnapshotWindow> mOuter;

        public void setOuter(TaskSnapshotWindow outer) {
        Window(TaskSnapshotWindow outer) {
            mOuter = new WeakReference<>(outer);
        }