Skip to content

Commit b8a9c3c

Browse files
author
Irina Dumitrescu
committed
Add keyguard support for disabling face and iris unlock.
Bug: 79565779 Test: adb shell dumpsys device_policy Change-Id: I0a80816d7e8f885de53c92f960f68e22845eac0f
1 parent f6c189c commit b8a9c3c

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

app/src/main/java/com/afwsamples/testdpc/policy/keyguard/LockScreenPolicyFragment.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ abstract static class Keys {
6969
static final String MAX_TIME_SCREEN_LOCK = "key_max_time_screen_lock";
7070
static final String MAX_TIME_SCREEN_LOCK_ALL = "key_max_time_screen_lock_aggregate";
7171

72+
static final String KEYGUARD_DISABLE_FACE = "keyguard_disable_face";
73+
static final String KEYGUARD_DISABLE_IRIS = "keyguard_disable_iris";
7274
static final String KEYGUARD_DISABLE_FINGERPRINT = "keyguard_disable_fingerprint";
7375
static final String KEYGUARD_DISABLE_REMOTE_INPUT = "keyguard_disable_remote_input";
7476
static final String KEYGUARD_DISABLE_SECURE_CAMERA = "keyguard_disable_secure_camera";
@@ -101,9 +103,15 @@ abstract static class Keys {
101103
KEYGUARD_FEATURES.put(Keys.KEYGUARD_DISABLE_TRUST_AGENTS,
102104
DevicePolicyManager.KEYGUARD_DISABLE_TRUST_AGENTS);
103105

106+
KEYGUARD_FEATURES.put(Keys.KEYGUARD_DISABLE_FACE,
107+
DevicePolicyManager.KEYGUARD_DISABLE_FACE);
108+
104109
KEYGUARD_FEATURES.put(Keys.KEYGUARD_DISABLE_FINGERPRINT,
105110
DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT);
106111

112+
KEYGUARD_FEATURES.put(Keys.KEYGUARD_DISABLE_IRIS,
113+
DevicePolicyManager.KEYGUARD_DISABLE_IRIS);
114+
107115
KEYGUARD_FEATURES.put(Keys.KEYGUARD_DISABLE_REMOTE_INPUT,
108116
DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT);
109117
}

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,8 @@
804804
<string name="keyguard_disable_secure_notifications">Disable secure notifications</string>
805805
<string name="keyguard_disable_unredacted_notifications">Disable unredacted notifications</string>
806806
<string name="keyguard_disable_trust_agents">Disable trust agents</string>
807+
<string name="keyguard_disable_face">Disable face unlock</string>
808+
<string name="keyguard_disable_iris">Disable iris unlock</string>
807809
<string name="keyguard_disable_fingerprint">Disable fingerprint</string>
808810
<string name="keyguard_disable_remote_input">Disable text entry in secure keyguard screen</string>
809811

app/src/main/res/xml/lock_screen_preferences.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,18 @@
8686
android:key="keyguard_disable_trust_agents"
8787
android:title="@string/keyguard_disable_trust_agents"
8888
testdpc:minSdkVersion="L" />
89+
<com.afwsamples.testdpc.common.preference.DpcSwitchPreference
90+
android:key="keyguard_disable_face"
91+
android:title="@string/keyguard_disable_face"
92+
testdpc:minSdkVersion="P" />
8993
<com.afwsamples.testdpc.common.preference.DpcSwitchPreference
9094
android:key="keyguard_disable_fingerprint"
9195
android:title="@string/keyguard_disable_fingerprint"
9296
testdpc:minSdkVersion="L" />
97+
<com.afwsamples.testdpc.common.preference.DpcSwitchPreference
98+
android:key="keyguard_disable_iris"
99+
android:title="@string/keyguard_disable_iris"
100+
testdpc:minSdkVersion="P" />
93101
<com.afwsamples.testdpc.common.preference.DpcSwitchPreference
94102
android:key="keyguard_disable_remote_input"
95103
android:title="@string/keyguard_disable_remote_input"

0 commit comments

Comments
 (0)