diff options
author | Haamed Gheibi <haamed@google.com> | 2021-07-12 20:47:45 +0000 |
---|---|---|
committer | Haamed Gheibi <haamed@google.com> | 2021-07-14 18:21:17 +0000 |
commit | 02a7ee5d65cb8d40fd1dde9aaf6b5ead9222a5a6 (patch) | |
tree | 6fb30a5bc0d0e7fadd37d62cdba537c4d5d9237b /packages/SystemUI/src/com/android/keyguard/LockIconView.java | |
parent | bab7c6ab6b363574baaace4df576c1abb67f4507 (diff) | |
parent | fa0439912edd9559d7c0f46bef2b2898de68f50f (diff) |
Merge SP1A.210709.002
Change-Id: I4610885d5d770d858895057cdd9fea387a5e33dd
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconView.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/LockIconView.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconView.java b/packages/SystemUI/src/com/android/keyguard/LockIconView.java index 423bd5626da9..c1d448db1e63 100644 --- a/packages/SystemUI/src/com/android/keyguard/LockIconView.java +++ b/packages/SystemUI/src/com/android/keyguard/LockIconView.java @@ -16,7 +16,6 @@ package com.android.keyguard; -import android.annotation.NonNull; import android.content.Context; import android.graphics.PointF; import android.graphics.RectF; @@ -24,10 +23,17 @@ import android.util.AttributeSet; import android.widget.FrameLayout; import android.widget.ImageView; +import androidx.annotation.NonNull; + +import com.android.systemui.Dumpable; + +import java.io.FileDescriptor; +import java.io.PrintWriter; + /** * A view positioned under the notification shade. */ -public class LockIconView extends ImageView { +public class LockIconView extends ImageView implements Dumpable { @NonNull private final RectF mSensorRect; @NonNull private PointF mLockIconCenter = new PointF(0f, 0f); private int mRadius; @@ -37,7 +43,7 @@ public class LockIconView extends ImageView { mSensorRect = new RectF(); } - void setLocation(@NonNull PointF center, int radius) { + void setCenterLocation(@NonNull PointF center, int radius) { mLockIconCenter = center; mRadius = radius; @@ -63,4 +69,11 @@ public class LockIconView extends ImageView { float getLocationTop() { return mLockIconCenter.y - mRadius; } + + + @Override + public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { + pw.println("Center in px (x, y)= (" + mLockIconCenter.x + ", " + mLockIconCenter.y + ")"); + pw.println("Radius in pixels: " + mRadius); + } } |