mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Cleanup API checks for P, Q, and R.
Test: Build with gradle Flag: NA Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.launcher3.widget;
|
||||
|
||||
import static com.android.launcher3.Utilities.ATLEAST_R;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Insets;
|
||||
@@ -153,17 +151,10 @@ public class AddItemWidgetsBottomSheet extends AbstractSlideInView<AddItemActivi
|
||||
@SuppressLint("NewApi") // Already added API check.
|
||||
@Override
|
||||
public WindowInsets onApplyWindowInsets(View view, WindowInsets windowInsets) {
|
||||
if (ATLEAST_R) {
|
||||
Insets insets = windowInsets.getInsets(WindowInsets.Type.systemBars());
|
||||
mInsets.set(insets.left, insets.top, insets.right, insets.bottom);
|
||||
} else {
|
||||
mInsets.set(windowInsets.getSystemWindowInsetLeft(),
|
||||
windowInsets.getSystemWindowInsetTop(),
|
||||
windowInsets.getSystemWindowInsetRight(),
|
||||
windowInsets.getSystemWindowInsetBottom());
|
||||
}
|
||||
mContent.setPadding(mContent.getPaddingStart(),
|
||||
mContent.getPaddingTop(), mContent.getPaddingEnd(), mInsets.bottom);
|
||||
Insets insets = windowInsets.getInsets(WindowInsets.Type.systemBars());
|
||||
mInsets.set(insets.left, insets.top, insets.right, insets.bottom);
|
||||
mContent.setPadding(mContent.getPaddingStart(), mContent.getPaddingTop(),
|
||||
mContent.getPaddingEnd(), mInsets.bottom);
|
||||
|
||||
int contentHorizontalMarginInPx = getResources().getDimensionPixelSize(
|
||||
R.dimen.widget_list_horizontal_margin);
|
||||
|
||||
Reference in New Issue
Block a user