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/KeyguardPinBasedInputView.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/KeyguardPinBasedInputView.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java index 6a6b964c2a8f..825ea2570df0 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java @@ -167,6 +167,20 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView } /** + * By default, the new layout will be enabled. When false, revert to the old style. + */ + public void setIsNewLayoutEnabled(boolean isEnabled) { + if (!isEnabled) { + for (int i = 0; i < mButtons.length; i++) { + mButtons[i].disableNewLayout(); + } + mDeleteButton.disableNewLayout(); + mOkButton.disableNewLayout(); + reloadColors(); + } + } + + /** * Reload colors from resources. **/ public void reloadColors() { |