From 8d20824ddf438e4f3ef3505895439f1add02b2b6 Mon Sep 17 00:00:00 2001 From: Maryam Dehaini Date: Wed, 14 Jun 2023 17:07:22 -0700 Subject: [PATCH] Do not show window decor for PIP DesktopModeWindowDecorViewModel#shouldShowWindowDecor should show false when windowing mode equals WINDOWING_MODE_PINNED Test: swipe up from fullscreen youtube video to enter PIP. There should not be black borders Bug: 287350098 Change-Id: Id1c75e8a60c2e2923d5d5132c9ed263635a3a84d --- .../wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java index 4e61aafa59a51..fd8980ed44d1f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java @@ -20,6 +20,7 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; +import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT; import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT; @@ -787,6 +788,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { return false; } return DesktopModeStatus.isProto2Enabled() + && taskInfo.getWindowingMode() != WINDOWING_MODE_PINNED && taskInfo.getActivityType() == ACTIVITY_TYPE_STANDARD && mDisplayController.getDisplayContext(taskInfo.displayId) .getResources().getConfiguration().smallestScreenWidthDp >= 600;