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

Commit 81747212 authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Process insets correctly" into qt-dev

am: 2534d6ec

Change-Id: I32bbb60b084bcc202fdbcff94c314d48856a427a
parents 4379f8cc 2534d6ec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
        android:clipChildren="false"
        android:clipToPadding="false"
        android:padding="0dp"
        android:fitsSystemWindows="true"
        android:layout_gravity="center">
        <com.android.keyguard.KeyguardSecurityViewFlipper
            android:id="@+id/view_flipper"
+6 −12
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.AlertDialog;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Rect;
import android.metrics.LogMaker;
import android.os.UserHandle;
import android.util.AttributeSet;
@@ -139,7 +140,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
            getSecurityView(mCurrentSecuritySelection).onResume(reason);
        }
        updateBiometricRetry();
        updatePaddings();
    }

    @Override
@@ -319,17 +319,11 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        updatePaddings();
    }

    private void updatePaddings() {
        int bottomPadding = getRootWindowInsets().getSystemWindowInsets().bottom;
        if (getPaddingBottom() == bottomPadding) {
            return;
        }
        setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), bottomPadding);
    protected boolean fitSystemWindows(Rect insets) {
        // Consume bottom insets because we're setting the padding locally (for IME and navbar.)
        setPadding(getPaddingLeft(), getPaddingTop(), getPaddingRight(), insets.bottom);
        insets.bottom = 0;
        return false;
    }

    private void showDialog(String title, String message) {