diff options
author | Matt Pietal <mpietal@google.com> | 2021-02-16 14:18:25 -0500 |
---|---|---|
committer | Matt Pietal <mpietal@google.com> | 2021-02-16 15:15:30 -0500 |
commit | 5bba2eaa71393ffed6fc939c0511d4666459de61 (patch) | |
tree | bcef2e880dcc27931186bd36e8ff2c3e0d9d67e8 /packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | |
parent | 2532b9d16991b7f998ce1901ec5de7d854f0c415 (diff) |
PIN View - Control layout based on feature flag
Support both the old-style PIN views and the new ones behind the
keyguard layout flag.
Fixes: 179121004
Test: adb shell cmd overlay disable com.google.android.systemui.gxoverlay
Change-Id: If588df2503d9337fe63b300fb24da09ef0a6d1e9
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java index 538daaf343f4..a0c5958284ec 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardInputViewController.java @@ -28,6 +28,7 @@ import com.android.keyguard.KeyguardSecurityModel.SecurityMode; import com.android.systemui.R; import com.android.systemui.classifier.FalsingCollector; import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.util.ViewController; import com.android.systemui.util.concurrency.DelayableExecutor; @@ -166,6 +167,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> private final TelephonyManager mTelephonyManager; private final EmergencyButtonController.Factory mEmergencyButtonControllerFactory; private final FalsingCollector mFalsingCollector; + private final boolean mIsNewLayoutEnabled; @Inject public Factory(KeyguardUpdateMonitor keyguardUpdateMonitor, @@ -176,7 +178,8 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> @Main Resources resources, LiftToActivateListener liftToActivateListener, TelephonyManager telephonyManager, EmergencyButtonController.Factory emergencyButtonControllerFactory, - FalsingCollector falsingCollector) { + FalsingCollector falsingCollector, + FeatureFlags featureFlags) { mKeyguardUpdateMonitor = keyguardUpdateMonitor; mLockPatternUtils = lockPatternUtils; mLatencyTracker = latencyTracker; @@ -188,6 +191,7 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> mTelephonyManager = telephonyManager; mEmergencyButtonControllerFactory = emergencyButtonControllerFactory; mFalsingCollector = falsingCollector; + mIsNewLayoutEnabled = featureFlags.isKeyguardLayoutEnabled(); } /** Create a new {@link KeyguardInputViewController}. */ @@ -212,21 +216,22 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView> return new KeyguardPinViewController((KeyguardPINView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker, - mLiftToActivateListener, emergencyButtonController, mFalsingCollector); + mLiftToActivateListener, emergencyButtonController, mFalsingCollector, + mIsNewLayoutEnabled); } else if (keyguardInputView instanceof KeyguardSimPinView) { return new KeyguardSimPinViewController((KeyguardSimPinView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker, mLiftToActivateListener, mTelephonyManager, emergencyButtonController, - mFalsingCollector); + mFalsingCollector, mIsNewLayoutEnabled); } else if (keyguardInputView instanceof KeyguardSimPukView) { return new KeyguardSimPukViewController((KeyguardSimPukView) keyguardInputView, mKeyguardUpdateMonitor, securityMode, mLockPatternUtils, keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker, mLiftToActivateListener, mTelephonyManager, emergencyButtonController, - mFalsingCollector); + mFalsingCollector, mIsNewLayoutEnabled); } throw new RuntimeException("Unable to find controller for " + keyguardInputView); |