diff options
author | Dave Mankoff <mankoff@google.com> | 2020-09-23 14:01:33 +0000 |
---|---|---|
committer | Dave Mankoff <mankoff@google.com> | 2020-09-24 11:04:51 -0400 |
commit | 6350a9f10bdb3f72e89122bd16fe29341dd1cd05 (patch) | |
tree | 641ac6f0924d47298bdb79035144a93d92f7e50c /packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | |
parent | 9408c9089afba9f4125a2eff6e3707a8f404469c (diff) |
Revert^2 "6/N Add Controller for KeyguardPatternView"
87f6d21e679af9f783777d21f08c46f8bcaf04c0
Change-Id: Id01e3ba154a6fe1d73f720b9389920dad60332ac
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java index 83fcac6579f2..552e62052e6f 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java @@ -19,6 +19,7 @@ package com.android.keyguard; import android.content.res.ColorStateList; import android.view.MotionEvent; +import com.android.internal.util.LatencyTracker; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardSecurityModel.SecurityMode; import com.android.systemui.util.ViewController; @@ -27,18 +28,21 @@ import javax.inject.Inject; /** Controller for a {@link KeyguardSecurityView}. */ -public class KeyguardInputViewController extends ViewController<KeyguardInputView> +public class KeyguardInputViewController<T extends KeyguardInputView> extends ViewController<T> implements KeyguardSecurityView { private final SecurityMode mSecurityMode; private final LockPatternUtils mLockPatternUtils; + private final KeyguardSecurityCallback mKeyguardSecurityCallback; + private KeyguardMessageAreaController mMessageAreaController; - private KeyguardInputViewController(KeyguardInputView view, SecurityMode securityMode, + protected KeyguardInputViewController(T view, SecurityMode securityMode, LockPatternUtils lockPatternUtils, KeyguardSecurityCallback keyguardSecurityCallback) { super(view); mSecurityMode = securityMode; mLockPatternUtils = lockPatternUtils; + mKeyguardSecurityCallback = keyguardSecurityCallback; mView.setKeyguardCallback(keyguardSecurityCallback); } @@ -143,17 +147,31 @@ public class KeyguardInputViewController extends ViewController<KeyguardInputVie /** Factory for a {@link KeyguardInputViewController}. */ public static class Factory { + private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; private final LockPatternUtils mLockPatternUtils; + private final LatencyTracker mLatencyTracker; + private final KeyguardMessageAreaController.Factory mMessageAreaControllerFactory; @Inject - public Factory(LockPatternUtils lockPatternUtils) { + public Factory(KeyguardUpdateMonitor keyguardUpdateMonitor, + LockPatternUtils lockPatternUtils, + LatencyTracker latencyTracker, + KeyguardMessageAreaController.Factory messageAreaControllerFactory) { + mKeyguardUpdateMonitor = keyguardUpdateMonitor; mLockPatternUtils = lockPatternUtils; + mLatencyTracker = latencyTracker; + mMessageAreaControllerFactory = messageAreaControllerFactory; } /** Create a new {@link KeyguardInputViewController}. */ public KeyguardInputViewController create(KeyguardInputView keyguardInputView, SecurityMode securityMode, KeyguardSecurityCallback keyguardSecurityCallback) { - return new KeyguardInputViewController(keyguardInputView, securityMode, + if (keyguardInputView instanceof KeyguardPatternView) { + return new KeyguardPatternViewController((KeyguardPatternView) keyguardInputView, + mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, + keyguardSecurityCallback, mLatencyTracker, mMessageAreaControllerFactory); + } + return new KeyguardInputViewController<>(keyguardInputView, securityMode, mLockPatternUtils, keyguardSecurityCallback); } } |