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

Commit e670be78 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Task snapshot surface needs to inherit new flags

Otherwise the layout isn't the same.

Bug: 118118435
Test: Reopen app, ensure no additional surface in starting window.
Change-Id: I2345b36426363a52470408f6fe2e4c7b3e145796
parent 069dc427
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;

import static com.android.internal.policy.DecorView.NAVIGATION_BAR_COLOR_VIEW_ATTRIBUTES;
import static com.android.internal.policy.DecorView.STATUS_BAR_COLOR_VIEW_ATTRIBUTES;
import static com.android.internal.policy.DecorView.getColorViewLeftInset;
@@ -184,8 +183,9 @@ class TaskSnapshotSurface implements StartingSurface {
                return null;
            }
            sysUiVis = topFullscreenOpaqueWindow.getSystemUiVisibility();
            windowFlags = topFullscreenOpaqueWindow.getAttrs().flags;
            windowPrivateFlags = topFullscreenOpaqueWindow.getAttrs().privateFlags;
            WindowManager.LayoutParams attrs = topFullscreenOpaqueWindow.mAttrs;
            windowFlags = attrs.flags;
            windowPrivateFlags = attrs.privateFlags;

            layoutParams.packageName = mainWindow.getAttrs().packageName;
            layoutParams.windowAnimations = mainWindow.getAttrs().windowAnimations;
@@ -200,6 +200,14 @@ class TaskSnapshotSurface implements StartingSurface {
            layoutParams.width = LayoutParams.MATCH_PARENT;
            layoutParams.height = LayoutParams.MATCH_PARENT;
            layoutParams.systemUiVisibility = sysUiVis;
            layoutParams.insetsFlags.behavior
                    = topFullscreenOpaqueWindow.mAttrs.insetsFlags.behavior;
            layoutParams.insetsFlags.appearance
                    = topFullscreenOpaqueWindow.mAttrs.insetsFlags.appearance;
            layoutParams.setFitInsetsTypes(attrs.getFitInsetsTypes());
            layoutParams.setFitInsetsSides(attrs.getFitInsetsSides());
            layoutParams.setFitInsetsIgnoringVisibility(attrs.isFitInsetsIgnoringVisibility());

            layoutParams.setTitle(String.format(TITLE_FORMAT, task.mTaskId));

            final TaskDescription td = task.getTaskDescription();