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

Commit 4d4ad6bf authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Update spacing for lock icon with udfps" into sc-dev am: 315a2678

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15190010

Change-Id: I6697adac6a2947e24368cafce0410f131936ea73
parents 4b1fda1c 315a2678
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);