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
This commit is contained in:
Aaron Liu
2023-05-16 10:06:57 -07:00
parent be5b49dc06
commit f4c68d8c29

View File

@@ -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();
}