diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 18388a95fac60..0a3e0c8c351ea 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -681,6 +681,9 @@
2dp
+
+ 48dp
+
0dp
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index 62cb4b9a33f59..7bbb63f02f14e 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 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 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 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);
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java
index 073e8861aa1e0..51124fb28ad19 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java
@@ -41,6 +41,7 @@ import com.android.systemui.util.concurrency.DelayableExecutor;
import java.io.FileDescriptor;
import java.io.PrintWriter;
+
/**
* Class that coordinates non-HBM animations during keyguard authentication.
*
@@ -207,7 +208,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController