Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 408d0a2a authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

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
parent abd75290
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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);
                }
+1 −1
Original line number Diff line number Diff line
@@ -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