summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
diff options
context:
space:
mode:
authorBeverly <beverlyt@google.com>2021-07-02 13:28:45 -0400
committerBeverly <beverlyt@google.com>2021-07-02 14:49:35 -0400
commit82d46f2b02f50202dffd18ede9144d3601542693 (patch)
tree5293958136927b6bf1c26452b0ae5db66db99108 /packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
parentd9dec0ff8ff13929dd12b73adafcae0031848f52 (diff)
Update spacing for lock icon with udfps
Limit text to two lines with ellipsis. Now correctly calculates spacing Test: manual Fixes: 192483581 Change-Id: Ie4f989b873c9aa2dcf09b02e77d16b7b9516580c
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/LockIconViewController.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index f3fbc50f560d..62cb4b9a33f5 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -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);