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

Commit 315a2678 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Update spacing for lock icon with udfps" into sc-dev

parents 34d05933 82d46f2b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@
            android:paddingStart="@dimen/keyguard_indication_text_padding"
            android:paddingEnd="@dimen/keyguard_indication_text_padding"
            android:textAppearance="@style/TextAppearance.Keyguard.BottomArea"
            android:maxLines="2"
            android:ellipsize="end"
            android:alpha=".8"
            android:accessibilityLiveRegion="polite"
            android:visibility="gone"/>
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ public class LockIconView extends ImageView implements Dumpable {
        mSensorRect = new RectF();
    }

    void setLocation(@NonNull PointF center, int radius) {
    void setCenterLocation(@NonNull PointF center, int radius) {
        mLockIconCenter = center;
        mRadius = radius;

+8 −6
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
    private float mHeightPixels;
    private float mWidthPixels;
    private float mDensity;
    private int mIndicationBottomPadding;
    private int mKgBottomAreaHeight;

    private boolean mShowUnlockIcon;
    private boolean mShowLockIcon;
@@ -280,7 +280,9 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
        mWidthPixels = metrics.widthPixels;
        mHeightPixels = metrics.heightPixels;
        mDensity = metrics.density;
        mIndicationBottomPadding = mView.getContext().getResources().getDimensionPixelSize(
        mKgBottomAreaHeight = mView.getContext().getResources().getDimensionPixelSize(
                R.dimen.keyguard_indication_margin_bottom)
            + mView.getContext().getResources().getDimensionPixelSize(
                R.dimen.keyguard_indication_bottom_padding);
        updateLockIconLocation();
    }
@@ -288,15 +290,15 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
    private void updateLockIconLocation() {
        if (mHasUdfps) {
            FingerprintSensorPropertiesInternal props = mAuthController.getUdfpsProps().get(0);
            mView.setLocation(new PointF(props.sensorLocationX, props.sensorLocationY),
            mView.setCenterLocation(new PointF(props.sensorLocationX, props.sensorLocationY),
                    props.sensorRadius);
        } else {
            final float distAboveKgBottomArea = 12 * mDensity;
            final float radius = 36 * mDensity;
            mView.setLocation(
            mView.setCenterLocation(
                    new PointF(mWidthPixels / 2,
                        mHeightPixels - mIndicationBottomPadding - distAboveKgBottomArea - radius),
                    (int) radius);
                        mHeightPixels - mKgBottomAreaHeight - distAboveKgBottomArea
                            - radius / 2), (int) radius);
        }

        mView.getHitRect(mSensorTouchLocation);