Skip to content

Commit 810d430

Browse files
committed
fixup! add option to scramble PIN layout
Extracted from: commit caa335d Author: Fred Underwood <[email protected]> Date: Sun Dec 22 06:53:47 2024 +1000 add second factor UI
1 parent 5681bcc commit 810d430

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.android.keyguard;
1818

19+
import static com.android.keyguard.KeyguardSecurityModel.SecurityMode.BiometricSecondFactorPin;
1920
import static com.android.systemui.Flags.pinInputFieldStyledFocusState;
2021
import static com.android.systemui.util.kotlin.JavaAdapterKt.collectFlow;
2122

@@ -95,9 +96,14 @@ protected KeyguardPinBasedInputViewController(T view,
9596

9697
Context ctx = view.getContext().getApplicationContext();
9798
int userId = mSelectedUserInteractor.getSelectedUserId();
98-
BoolSetting setting = this instanceof KeyguardPinViewController ?
99-
ExtSettings.SCRAMBLE_LOCKSCREEN_PIN_LAYOUT :
100-
ExtSettings.SCRAMBLE_SIM_PIN_LAYOUT;
99+
BoolSetting setting;
100+
if (this instanceof KeyguardPinViewController) {
101+
setting = securityMode == BiometricSecondFactorPin ?
102+
ExtSettings.SCRAMBLE_LOCKSCREEN_PIN_LAYOUT_SECONDARY :
103+
ExtSettings.SCRAMBLE_LOCKSCREEN_PIN_LAYOUT_PRIMARY;
104+
} else {
105+
setting = ExtSettings.SCRAMBLE_SIM_PIN_LAYOUT;
106+
}
101107
view.setupPinScrambling(setting.get(ctx, userId));
102108
}
103109

0 commit comments

Comments
 (0)