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

Commit 0fe3b00c authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Copy insets state for snapshot starting window

Commit 837fd134 remove the copy accidentally. That causes the
original insets state to be modified unexpectedly.

Bug: 168023253
Test: WmTests
Change-Id: I31242e6e325a1df2afeac77faf6b2af05c0de138
parent a67c5344
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ class TaskSnapshotController {
        final int color = ColorUtils.setAlphaComponent(
                task.getTaskDescription().getBackgroundColor(), 255);
        final LayoutParams attrs = mainWindow.getAttrs();
        final InsetsState insetsState = mainWindow.getInsetsState();
        final InsetsState insetsState = new InsetsState(mainWindow.getInsetsState());
        mergeInsetsSources(insetsState, mainWindow.getRequestedInsetsState());
        final Rect systemBarInsets = getSystemBarInsets(mainWindow.getFrame(), insetsState);
        final SystemBarBackgroundPainter decorPainter = new SystemBarBackgroundPainter(attrs.flags,
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ class TaskSnapshotSurface implements StartingSurface {
            task.getBounds(taskBounds);
            currentOrientation = topFullscreenOpaqueWindow.getConfiguration().orientation;
            activityType = activity.getActivityType();
            insetsState = topFullscreenOpaqueWindow.getInsetsState();
            insetsState = new InsetsState(topFullscreenOpaqueWindow.getInsetsState());
            mergeInsetsSources(insetsState, topFullscreenOpaqueWindow.getRequestedInsetsState());
        }
        try {