summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2021-08-04 03:02:11 +0000
committerScott Lobdell <slobdell@google.com>2021-08-06 17:25:21 +0000
commit9d10272031d3f400d399db45927abf3be739b074 (patch)
treeb9a3f179cf0abb8f6986f4c2268a617a34d663c8 /packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
parent22fd7d8dfaf39ca6b15bd360409f3fa580adf2f6 (diff)
parentb3abfad71a54152026b023b831ddd1793f361fa8 (diff)
Merge SP1A.210803.001
Change-Id: I09253f8614e9ee85a59460f3ef25f17dd98cac80
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/LockIconViewController.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index 9c8582fa334d..4317e258d8f7 100644
--- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
@@ -43,7 +43,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
-import com.android.settingslib.Utils;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.biometrics.AuthController;
@@ -97,8 +96,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
@NonNull private final AnimatedVectorDrawable mLockToUnlockIcon;
@NonNull private final Drawable mLockIcon;
@NonNull private final Drawable mUnlockIcon;
- @NonNull private final CharSequence mUnlockedLabel;
- @NonNull private final CharSequence mLockedLabel;
+ @NonNull private CharSequence mUnlockedLabel;
+ @NonNull private CharSequence mLockedLabel;
@Nullable private final Vibrator mVibrator;
private boolean mIsDozing;
@@ -111,7 +110,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
private boolean mUserUnlockedWithBiometric;
private Runnable mCancelDelayedUpdateVisibilityRunnable;
- private boolean mHasUdfps;
+ private boolean mUdfpsSupported;
private float mHeightPixels;
private float mWidthPixels;
private int mBottomPadding; // in pixels
@@ -152,9 +151,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
final Context context = view.getContext();
mUnlockIcon = mView.getContext().getResources().getDrawable(
- R.anim.lock_to_unlock,
+ R.drawable.ic_unlock,
mView.getContext().getTheme());
- ((AnimatedVectorDrawable) mUnlockIcon).start();
mLockIcon = mView.getContext().getResources().getDrawable(
R.anim.lock_to_unlock,
mView.getContext().getTheme());
@@ -177,7 +175,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
protected void onViewAttached() {
// we check this here instead of onInit since the FingerprintManager + FaceManager may not
// have started up yet onInit
- mHasUdfps = mAuthController.getUdfpsSensorLocation() != null;
+ mUdfpsSupported = mAuthController.getUdfpsSensorLocation() != null;
updateConfiguration();
updateKeyguardShowing();
@@ -307,12 +305,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
private void updateColors() {
- final int color = Utils.getColorAttrDefaultColor(mView.getContext(),
- R.attr.wallpaperTextColorAccent);
- mFpToUnlockIcon.setTint(color);
- mLockToUnlockIcon.setTint(color);
- mLockIcon.setTint(color);
- mUnlockIcon.setTint(color);
+ mView.updateColorAndBackgroundVisibility(mUdfpsSupported);
}
private void updateConfiguration() {
@@ -321,11 +314,17 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
mHeightPixels = metrics.heightPixels;
mBottomPadding = mView.getContext().getResources().getDimensionPixelSize(
R.dimen.lock_icon_margin_bottom);
+
+ mUnlockedLabel = mView.getContext().getResources().getString(
+ R.string.accessibility_unlock_button);
+ mLockedLabel = mView.getContext()
+ .getResources().getString(R.string.accessibility_lock_icon);
+
updateLockIconLocation();
}
private void updateLockIconLocation() {
- if (mHasUdfps) {
+ if (mUdfpsSupported) {
FingerprintSensorPropertiesInternal props = mAuthController.getUdfpsProps().get(0);
mView.setCenterLocation(new PointF(props.sensorLocationX, props.sensorLocationY),
props.sensorRadius);
@@ -467,6 +466,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
@Override
public void onConfigChanged(Configuration newConfig) {
updateConfiguration();
+ updateColors();
}
};
@@ -560,7 +560,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
private boolean isClickable() {
- return mUdfpsEnrolled || mShowUnlockIcon;
+ return mUdfpsSupported || mShowUnlockIcon;
}
/**