summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
diff options
context:
space:
mode:
authorDave Mankoff <mankoff@google.com>2020-08-31 16:59:58 -0400
committerDave Mankoff <mankoff@google.com>2020-09-08 14:47:43 -0400
commit860a2c0343354be81c8b845b1ee3075c0c5ca10e (patch)
treef1d872e09b1b3d6037e5d6822505aeb1143f9f19 /packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
parentf6032e30d71f51d8f5b5c037ec500b4aa589b731 (diff)
3/N Use KeyguardSecurityContainerController in KHVC.
Use the KeyguardSecurityContainerController in the KeyguardHostViewController instead of the view directly. This actually cleans up KeyguardHostView quite a bit, with all lot of its business logic moved over to its view. The KeyguardSecurityContainerController doesn't do much except to proxy through calls to its view for now. Bug: 166448040 Test: atest SystemUITests && manual Change-Id: I96a27b673c4579983bb07b7fb7ef321a022f0f65
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java73
1 files changed, 71 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
index 30480a15b437..17f25bd08ef4 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
@@ -16,6 +16,11 @@
package com.android.keyguard;
+import android.content.res.ColorStateList;
+
+import com.android.internal.widget.LockPatternUtils;
+import com.android.keyguard.KeyguardSecurityContainer.SecurityCallback;
+import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
import com.android.systemui.util.ViewController;
import javax.inject.Inject;
@@ -23,27 +28,91 @@ import javax.inject.Inject;
/** Controller for {@link KeyguardSecurityContainer} */
public class KeyguardSecurityContainerController extends ViewController<KeyguardSecurityContainer> {
+ private final LockPatternUtils mLockPatternUtils;
private final KeyguardSecurityViewController.Factory mKeyguardSecurityViewControllerFactory;
@Inject
KeyguardSecurityContainerController(KeyguardSecurityContainer view,
+ LockPatternUtils lockPatternUtils,
KeyguardSecurityViewController.Factory keyguardSecurityViewControllerFactory) {
super(view);
+ mLockPatternUtils = lockPatternUtils;
+ view.setLockPatternUtils(mLockPatternUtils);
mKeyguardSecurityViewControllerFactory = keyguardSecurityViewControllerFactory;
}
@Override
protected void onViewAttached() {
-
}
@Override
protected void onViewDetached() {
-
}
/** */
public void onPause() {
mView.onPause();
}
+
+ public void showPrimarySecurityScreen(boolean turningOff) {
+ mView.showPrimarySecurityScreen(turningOff);
+ }
+
+ public void showPromptReason(int reason) {
+ mView.showPromptReason(reason);
+ }
+
+ public void showMessage(CharSequence message, ColorStateList colorState) {
+ mView.showMessage(message, colorState);
+ }
+
+ public SecurityMode getCurrentSecuritySelection() {
+ return mView.getCurrentSecuritySelection();
+ }
+
+ public void dismiss(boolean authenticated, int targetUserId) {
+ mView.dismiss(authenticated, targetUserId);
+ }
+
+ public void reset() {
+ mView.reset();
+ }
+
+ public CharSequence getTitle() {
+ return mView.getTitle();
+ }
+
+ public void onResume(int screenOn) {
+ mView.onResume(screenOn);
+ }
+
+ public void startAppearAnimation() {
+ mView.startAppearAnimation();
+ }
+
+ public boolean startDisappearAnimation(Runnable onFinishRunnable) {
+ return mView.startDisappearAnimation(onFinishRunnable);
+ }
+
+ public void onStartingToHide() {
+ mView.onStartingToHide();
+ }
+
+ public void setSecurityCallback(SecurityCallback securityCallback) {
+ mView.setSecurityCallback(securityCallback);
+ }
+
+ public boolean showNextSecurityScreenOrFinish(boolean authenticated, int targetUserId,
+ boolean bypassSecondaryLockScreen) {
+ return mView.showNextSecurityScreenOrFinish(
+ authenticated, targetUserId, bypassSecondaryLockScreen);
+ }
+
+ public boolean needsInput() {
+ return mView.needsInput();
+ }
+
+ public SecurityMode getCurrentSecurityMode() {
+ return mView.getCurrentSecurityMode();
+ }
}