From 82d0be71f51a749becfb5aaa8bd7e4263541070a Mon Sep 17 00:00:00 2001 From: Oleg Blinnikov Date: Mon, 28 Nov 2022 16:31:56 +0000 Subject: [PATCH] Add rounded corners to letterbox when taskbar is visible Previously letterbox corners were not rounded when taskbar was minimized. This is because taskbar insets height was smaller than taskbar_frame_height This check is not necessary, and crop of the application window is applied correctly Change-Id: Ib3f0737b6cfd593a7bf3dbf9205e4cc9a3f9b506 Bug: 259679233 Test: manual --- .../java/com/android/server/wm/LetterboxUiController.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/services/core/java/com/android/server/wm/LetterboxUiController.java b/services/core/java/com/android/server/wm/LetterboxUiController.java index 74a236bd862c7..5335b62d503aa 100644 --- a/services/core/java/com/android/server/wm/LetterboxUiController.java +++ b/services/core/java/com/android/server/wm/LetterboxUiController.java @@ -87,10 +87,6 @@ final class LetterboxUiController { private final LetterboxConfiguration mLetterboxConfiguration; private final ActivityRecord mActivityRecord; - // Taskbar expanded height. Used to determine whether to crop an app window to display rounded - // corners above the taskbar. - private final float mExpandedTaskBarHeight; - private boolean mShowWallpaperForLetterboxBackground; @Nullable @@ -102,8 +98,6 @@ final class LetterboxUiController { // is created in its constructor. It shouldn't be used in this constructor but it's safe // to use it after since controller is only used in ActivityRecord. mActivityRecord = activityRecord; - mExpandedTaskBarHeight = - getResources().getDimensionPixelSize(R.dimen.taskbar_frame_height); } /** Cleans up {@link Letterbox} if it exists.*/ @@ -555,7 +549,6 @@ final class LetterboxUiController { final InsetsSource taskbarInsetsSource = getTaskbarInsetsSource(mainWindow); return taskbarInsetsSource != null - && taskbarInsetsSource.getFrame().height() >= mExpandedTaskBarHeight && taskbarInsetsSource.isVisible(); }