summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
diff options
context:
space:
mode:
authorBeverly <beverlyt@google.com>2021-07-14 16:01:50 -0400
committerBeverly <beverlyt@google.com>2021-07-29 09:38:01 -0400
commit294e8a1efc67505ae8ecad3f2f8e866b22dcbe9a (patch)
tree99d8dc064c2b6e8cbd0549f93f83c9002b1cf76c /packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
parent1219bfb27fbc9b1744acfca89f35d26e759f2fdf (diff)
For devices with udfps, always show bg on udfps
Also show background on lock icon and unlock icons if the device supports udfps. This is to help indicate the affordance is tappable. Test: manually test with and w/o udfps - AOD <=> Lock screen - gpay wallet affordance on LS that requests udfps - slowly swipe up to show bouncer => udfps fades - slowly swipe down to expand notification shade => udfps fades - tap notification on ls, no bg animation - tap notification on locked shade, there is a bg animation - toggle on/off dark mode from lock screen Fixes: 192403524 Change-Id: I5a19d3cd45c51af78a49d46126fc0678a3df6d6c
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/LockIconViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/LockIconViewController.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java
index 9c8582fa334d..9beb4cce0ca7 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;
@@ -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() {
@@ -325,7 +318,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
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 +460,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
@Override
public void onConfigChanged(Configuration newConfig) {
updateConfiguration();
+ updateColors();
}
};
@@ -560,7 +554,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
}
private boolean isClickable() {
- return mUdfpsEnrolled || mShowUnlockIcon;
+ return mUdfpsSupported || mShowUnlockIcon;
}
/**