summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
diff options
context:
space:
mode:
authorBeverly <beverlyt@google.com>2021-07-08 17:38:49 -0400
committerBeverly Tai <beverlyt@google.com>2021-07-09 17:28:30 +0000
commitb7ce2600b4f726ebfd32662bf6f9d7ee49639147 (patch)
tree14d7c50f883836857fa439c0116da243bea42924 /packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
parent1d2cbb6f50fe3eb2b4281834af4e4bfe8f4097c3 (diff)
Update udfps fade + padding
- Make sure udfps doesn't overlap notification shade by giving it a 48dp buffer from the notification shade - Start fading out the udfps icon faster when swiping up to the bouncer - Include now playing text in the buffer for the lock icon position Test: manual Bug: 192926771 Fixes: 193193900 Change-Id: I3faf73548c9990886237c28d28e7e8b0f9e8686e
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/LockIconViewController.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index 62cb4b9a33f5..7bbb63f02f14 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -98,7 +98,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
private float mHeightPixels;
private float mWidthPixels;
private float mDensity;
- private int mKgBottomAreaHeight;
+ private int mAmbientIndicationHeight; // in pixels
+ private int mKgIndicationHeight; // in pixels
private boolean mShowUnlockIcon;
private boolean mShowLockIcon;
@@ -280,7 +281,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
mWidthPixels = metrics.widthPixels;
mHeightPixels = metrics.heightPixels;
mDensity = metrics.density;
- mKgBottomAreaHeight = mView.getContext().getResources().getDimensionPixelSize(
+ mKgIndicationHeight = mView.getContext().getResources().getDimensionPixelSize(
R.dimen.keyguard_indication_margin_bottom)
+ mView.getContext().getResources().getDimensionPixelSize(
R.dimen.keyguard_indication_bottom_padding);
@@ -295,15 +296,24 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
} else {
final float distAboveKgBottomArea = 12 * mDensity;
final float radius = 36 * mDensity;
+ final int kgBottomAreaHeight = Math.max(mKgIndicationHeight, mAmbientIndicationHeight);
mView.setCenterLocation(
new PointF(mWidthPixels / 2,
- mHeightPixels - mKgBottomAreaHeight - distAboveKgBottomArea
+ mHeightPixels - kgBottomAreaHeight - distAboveKgBottomArea
- radius / 2), (int) radius);
}
mView.getHitRect(mSensorTouchLocation);
}
+ /**
+ * Set the location of ambient indication if showing (ie: now playing)
+ */
+ public void setAmbientIndicationBottomPadding(int ambientIndicationBottomPadding) {
+ mAmbientIndicationHeight = ambientIndicationBottomPadding;
+ updateLockIconLocation();
+ }
+
@Override
public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) {
pw.println("mUdfpsEnrolled: " + mUdfpsEnrolled);