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

Commit 82d0be71 authored by Oleg Blinnikov's avatar Oleg Blinnikov
Browse files

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
parent 91265752
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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();
    }