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
This commit is contained in:
Oleg Blinnikov
2022-11-28 16:31:56 +00:00
parent 91265752f1
commit 82d0be71f5

View File

@@ -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();
}