diff options
author | Dave Mankoff <mankoff@google.com> | 2021-03-04 10:52:04 -0500 |
---|---|---|
committer | Dave Mankoff <mankoff@google.com> | 2021-03-10 16:42:23 -0500 |
commit | 03c717447d007ccd5ce8c202af600483cc182523 (patch) | |
tree | b0af8a09d411cdb7435c7d216863df20544b618e /packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | |
parent | 8d0f3a0c3c735d9ad9fb7173ccce847f1dc89e1f (diff) |
Add continuous falsing to keyguard.
With this change, taps outside of the bouncer inputs increase the
FalsingManager's belief that erroneous taps are happening. If the
belief becomes strong enough, the bouncer will be retracted.
Special attention is given to ensure that actual password inputs
are not recorded by the falsing manager. Valid button and pattern
inputs do not have their motion events recorded, but do _decrease_
the FalsingManager's belief in pocket dialing. Thus, a few bad taps
mixed with good taps will not retract the bouncer.
Test: atest SystemUITests && manual
Bug: 172655679
Change-Id: Iac8d2a2f41764f3c1cccb66b9d332c489cabca77
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java index 8cbaae5661ae..05f33a9d0997 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java @@ -27,7 +27,6 @@ import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardSecurityModel.SecurityMode; import com.android.systemui.R; import com.android.systemui.classifier.FalsingCollector; -import com.android.systemui.classifier.SingleTapClassifier; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.util.ViewController; @@ -156,10 +155,9 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> private final InputMethodManager mInputMethodManager; private final DelayableExecutor mMainExecutor; private final Resources mResources; - private LiftToActivateListener mLiftToActivateListener; - private TelephonyManager mTelephonyManager; + private final LiftToActivateListener mLiftToActivateListener; + private final TelephonyManager mTelephonyManager; private final FalsingCollector mFalsingCollector; - private final SingleTapClassifier mSingleTapClassifier; private final boolean mIsNewLayoutEnabled; @Inject @@ -169,9 +167,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> KeyguardMessageAreaController.Factory messageAreaControllerFactory, InputMethodManager inputMethodManager, @Main DelayableExecutor mainExecutor, @Main Resources resources, LiftToActivateListener liftToActivateListener, - TelephonyManager telephonyManager, - FalsingCollector falsingCollector, - SingleTapClassifier singleTapClassifier, + TelephonyManager telephonyManager, FalsingCollector falsingCollector, FeatureFlags featureFlags) { mKeyguardUpdateMonitor = keyguardUpdateMonitor; mLockPatternUtils = lockPatternUtils; @@ -183,7 +179,6 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> mLiftToActivateListener = liftToActivateListener; mTelephonyManager = telephonyManager; mFalsingCollector = falsingCollector; - mSingleTapClassifier = singleTapClassifier; mIsNewLayoutEnabled = featureFlags.isKeyguardLayoutEnabled(); } @@ -193,31 +188,30 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> if (keyguardInputView instanceof KeyguardPatternView) { return new KeyguardPatternViewController((KeyguardPatternView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, - keyguardSecurityCallback, mLatencyTracker, mMessageAreaControllerFactory); + keyguardSecurityCallback, mLatencyTracker, mFalsingCollector, + mMessageAreaControllerFactory); } else if (keyguardInputView instanceof KeyguardPasswordView) { return new KeyguardPasswordViewController((KeyguardPasswordView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker, - mInputMethodManager, mMainExecutor, mResources, mFalsingCollector, - mSingleTapClassifier); + mInputMethodManager, mMainExecutor, mResources, mFalsingCollector); } else if (keyguardInputView instanceof KeyguardPINView) { return new KeyguardPinViewController((KeyguardPINView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker, - mLiftToActivateListener, mFalsingCollector, mSingleTapClassifier, - mIsNewLayoutEnabled); + mLiftToActivateListener, mFalsingCollector, mIsNewLayoutEnabled); } else if (keyguardInputView instanceof KeyguardSimPinView) { return new KeyguardSimPinViewController((KeyguardSimPinView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker, mLiftToActivateListener, mTelephonyManager, mFalsingCollector, - mSingleTapClassifier, mIsNewLayoutEnabled); + mIsNewLayoutEnabled); } else if (keyguardInputView instanceof KeyguardSimPukView) { return new KeyguardSimPukViewController((KeyguardSimPukView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker, mLiftToActivateListener, mTelephonyManager, mFalsingCollector, - mSingleTapClassifier, mIsNewLayoutEnabled); + mIsNewLayoutEnabled); } throw new RuntimeException("Unable to find controller for " + keyguardInputView); |