Merge "Update spacing for lock icon with udfps" into sc-dev
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index e40138e..9ce83a7 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -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"/>
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconView.java b/packages/SystemUI/src/com/android/keyguard/LockIconView.java
index c425ddf..c1d448d 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconView.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconView.java
@@ -43,7 +43,7 @@
         mSensorRect = new RectF();
     }
 
-    void setLocation(@NonNull PointF center, int radius) {
+    void setCenterLocation(@NonNull PointF center, int radius) {
         mLockIconCenter = center;
         mRadius = radius;
 
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index f3fbc50..62cb4b9 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -98,7 +98,7 @@
     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 @@
         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 @@
     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);