On devices with udfps supported, show auth ripple

Show the auth ripple if the user enters the device
via the unlock icon (where the udfps icon would normally be).

Test: manual
Fixes: 195162787
Change-Id: Ie65dce30c009f94a0472f566c3663a0de2bc063b
This commit is contained in:
Beverly
2021-08-02 14:57:29 -04:00
committed by Beverly Tai
parent abd75290ad
commit 408d0a2a53
2 changed files with 9 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.biometrics.AuthController;
import com.android.systemui.biometrics.AuthRippleController;
import com.android.systemui.biometrics.UdfpsController;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.DumpManager;
@@ -99,6 +100,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
@NonNull private CharSequence mUnlockedLabel;
@NonNull private CharSequence mLockedLabel;
@Nullable private final Vibrator mVibrator;
@Nullable private final AuthRippleController mAuthRippleController;
private boolean mIsDozing;
private boolean mIsBouncerShowing;
@@ -135,7 +137,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
@NonNull AccessibilityManager accessibilityManager,
@NonNull ConfigurationController configurationController,
@NonNull @Main DelayableExecutor executor,
@Nullable Vibrator vibrator
@Nullable Vibrator vibrator,
@Nullable AuthRippleController authRippleController
) {
super(view);
mStatusBarStateController = statusBarStateController;
@@ -148,6 +151,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
mConfigurationController = configurationController;
mExecutor = executor;
mVibrator = vibrator;
mAuthRippleController = authRippleController;
final Context context = view.getContext();
mUnlockIcon = mView.getContext().getResources().getDrawable(
@@ -538,6 +542,9 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
// pre-emptively set to true to hide view
mIsBouncerShowing = true;
if (mUdfpsSupported && mShowUnlockIcon && mAuthRippleController != null) {
mAuthRippleController.showRipple(FINGERPRINT);
}
updateVisibility();
mKeyguardViewController.showBouncer(/* scrim */ true);
}

View File

@@ -79,7 +79,7 @@ class AuthRippleController @Inject constructor(
notificationShadeWindowController.setForcePluginOpen(false, this)
}
private fun showRipple(biometricSourceType: BiometricSourceType?) {
fun showRipple(biometricSourceType: BiometricSourceType?) {
if (!keyguardUpdateMonitor.isKeyguardVisible ||
keyguardUpdateMonitor.userNeedsStrongAuth()) {
return