diff options
author | Dave Mankoff <mankoff@google.com> | 2020-09-14 12:20:41 -0400 |
---|---|---|
committer | Dave Mankoff <mankoff@google.com> | 2020-09-16 16:27:56 -0400 |
commit | 4a3d8000168accd9bdc431ddd8599fdd299bbcaa (patch) | |
tree | f0851d4e160ce3cca5f1ff24d4b4fe220703c4af /packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java | |
parent | 720c7c6eff34fd005f130f39f5ab8d63ba8b9ced (diff) |
9/N Clean Up Keyguard Class Structure
KeyguardInputView no longer implements KeyguardSecurityView.
This cl seeks to clean up some of the lingering vestiges from this
large chain of refactors.
I have manually tested none, swipe, pattern, pin, and password views
for successfully unlocking, as well as multiple failed attempts
resulting in temporary lock outs.
Fixes: 166448040
Test: atest SystemUITests && manual
Change-Id: I36275598001184e774677cf2dbb16dec8dc7ab5b
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java index 38b535049fb4..3db9db7be00c 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java @@ -54,13 +54,12 @@ public class KeyguardPatternViewController private KeyguardMessageAreaController mMessageAreaController; private LockPatternView mLockPatternView; private CountDownTimer mCountdownTimer; - private KeyguardSecurityCallback mCallback; private AsyncTask<?, ?, ?> mPendingLockCheck; private EmergencyButtonCallback mEmergencyButtonCallback = new EmergencyButtonCallback() { @Override public void onEmergencyButtonClickedWhenInCall() { - mCallback.reset(); + getKeyguardSecurityCallback().reset(); } }; @@ -88,8 +87,8 @@ public class KeyguardPatternViewController @Override public void onPatternCellAdded(List<Cell> pattern) { - mCallback.userActivity(); - mCallback.onUserInput(); + getKeyguardSecurityCallback().userActivity(); + getKeyguardSecurityCallback().onUserInput(); } @Override @@ -141,8 +140,8 @@ public class KeyguardPatternViewController } }); if (pattern.size() > MIN_PATTERN_BEFORE_POKE_WAKELOCK) { - mCallback.userActivity(); - mCallback.onUserInput(); + getKeyguardSecurityCallback().userActivity(); + getKeyguardSecurityCallback().onUserInput(); } } @@ -150,15 +149,15 @@ public class KeyguardPatternViewController boolean isValidPattern) { boolean dismissKeyguard = KeyguardUpdateMonitor.getCurrentUser() == userId; if (matched) { - mCallback.reportUnlockAttempt(userId, true, 0); + getKeyguardSecurityCallback().reportUnlockAttempt(userId, true, 0); if (dismissKeyguard) { mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Correct); - mCallback.dismiss(true, userId); + getKeyguardSecurityCallback().dismiss(true, userId); } } else { mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Wrong); if (isValidPattern) { - mCallback.reportUnlockAttempt(userId, false, timeoutMs); + getKeyguardSecurityCallback().reportUnlockAttempt(userId, false, timeoutMs); if (timeoutMs > 0) { long deadline = mLockPatternUtils.setLockoutAttemptDeadline( userId, timeoutMs); @@ -213,8 +212,8 @@ public class KeyguardPatternViewController View cancelBtn = mView.findViewById(R.id.cancel_button); if (cancelBtn != null) { cancelBtn.setOnClickListener(view -> { - mCallback.reset(); - mCallback.onCancelClicked(); + getKeyguardSecurityCallback().reset(); + getKeyguardSecurityCallback().onCancelClicked(); }); } } @@ -269,8 +268,8 @@ public class KeyguardPatternViewController } @Override - public void setKeyguardCallback(KeyguardSecurityCallback callback) { - mCallback = callback; + public boolean needsInput() { + return false; } @Override |