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

Commit 23dbd256 authored by Kshitij's avatar Kshitij
Browse files

chore: @SuppressLint("NewApi") for setPageIndicatorInset

parent 415d0d47
Loading
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -398,6 +398,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
        setPageIndicatorInset();
    }

    @SuppressLint("NewApi")
    private void setPageIndicatorInset() {
        DeviceProfile grid = mLauncher.getDeviceProfile();

@@ -420,11 +421,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
            // Get "safe" drawable inset to not overlap gesture pill
            int safeBottomInset;
            WindowInsets rootInsets = mLauncher.getWindow().getDecorView().getRootWindowInsets();
            if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
            safeBottomInset = rootInsets.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars()).bottom;
            } else {
                safeBottomInset = rootInsets.getStableInsetBottom();
            }
            lp.bottomMargin = safeBottomInset;
        } else {
            lp.bottomMargin = grid.hotseatBarSizePx;