From f4c68d8c298c2f9888a206f93ecabd8d71ef07e6 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Tue, 16 May 2023 10:06:57 -0700 Subject: [PATCH] Set expected pin length in constructor. In the bug, it seems clear that the pinlength field is set to 0. This means that the start appar animation is not called here but the view is inflated...Having the field at 0 is causing an ANR. I believe this is likely because we are calling reset somewhere before we show the view. Test: Open bouncer and authenticate auto confirmation pin bouncer. Fixes: 281424496 Change-Id: I776645ea633e49e45e8e30386cfc91bff3339f72 --- .../src/com/android/keyguard/KeyguardPinViewController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java index f191281277b90..3e16d559742d9 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java @@ -62,6 +62,7 @@ public class KeyguardPinViewController mLockPatternUtils = lockPatternUtils; mFeatureFlags = featureFlags; mBackspaceKey = view.findViewById(R.id.delete_button); + mPinLength = mLockPatternUtils.getPinLength(KeyguardUpdateMonitor.getCurrentUser()); } @Override @@ -99,7 +100,6 @@ public class KeyguardPinViewController @Override public void startAppearAnimation() { if (mFeatureFlags.isEnabled(Flags.AUTO_PIN_CONFIRMATION)) { - mPinLength = mLockPatternUtils.getPinLength(KeyguardUpdateMonitor.getCurrentUser()); mPasswordEntry.setUsePinShapes(true); updateAutoConfirmationState(); }