summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java
diff options
context:
space:
mode:
authorDave Mankoff <mankoff@google.com>2020-09-14 12:20:41 -0400
committerDave Mankoff <mankoff@google.com>2020-09-16 16:27:56 -0400
commit4a3d8000168accd9bdc431ddd8599fdd299bbcaa (patch)
treef0851d4e160ce3cca5f1ff24d4b4fe220703c4af /packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java
parent720c7c6eff34fd005f130f39f5ab8d63ba8b9ced (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/KeyguardPinViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java
index 625ab5214da1..6769436be8ef 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinViewController.java
@@ -16,9 +16,12 @@
package com.android.keyguard;
+import android.view.View;
+
import com.android.internal.util.LatencyTracker;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
+import com.android.systemui.R;
public class KeyguardPinViewController
extends KeyguardPinBasedInputViewController<KeyguardPINView> {
@@ -37,6 +40,19 @@ public class KeyguardPinViewController
}
@Override
+ protected void onViewAttached() {
+ super.onViewAttached();
+
+ View cancelBtn = mView.findViewById(R.id.cancel_button);
+ if (cancelBtn != null) {
+ cancelBtn.setOnClickListener(view -> {
+ getKeyguardSecurityCallback().reset();
+ getKeyguardSecurityCallback().onCancelClicked();
+ });
+ }
+ }
+
+ @Override
void resetState() {
super.resetState();
mMessageAreaController.setMessage("");