summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kevin Chyn <kchyn@google.com> 2019-04-16 04:43:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-04-16 04:43:32 +0000
commit12154d85a49117894db31096fce56860367b501e (patch)
tree1c06de23154185c73411b7c5573f4a65580deb83
parent977f63a3d3d0ccba78d4924b489349a2e26bd666 (diff)
parentc78071f29a2f13b977d54b0bfcae46d8c7f36b13 (diff)
Merge "Cache and log enrollment settings" into qt-dev
-rw-r--r--core/java/android/provider/Settings.java12
-rw-r--r--core/tests/coretests/src/android/provider/SettingsBackupTest.java4
-rw-r--r--services/core/java/com/android/server/stats/StatsCompanionService.java3
3 files changed, 14 insertions, 5 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 0491c732db81..c59e3cbc1326 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -8139,7 +8139,14 @@ public final class Settings {
public static final String FACE_UNLOCK_ATTENTION_REQUIRED =
"face_unlock_attention_required";
- private static final Validator FACE_UNLOCK_ATTENTION_REQUIRED_VALIDATOR = BOOLEAN_VALIDATOR;
+ /**
+ * Whether or not face unlock requires a diverse set of poses during enrollment. This is a
+ * cached value, the source of truth is obtained through the HAL.
+ * @hide
+ */
+ public static final String FACE_UNLOCK_DIVERSITY_REQUIRED =
+ "face_unlock_diversity_required";
+
/**
* Whether or not face unlock is allowed for apps (through BiometricPrompt).
@@ -8797,7 +8804,6 @@ public final class Settings {
AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
FACE_UNLOCK_KEYGUARD_ENABLED,
FACE_UNLOCK_DISMISSES_KEYGUARD,
- FACE_UNLOCK_ATTENTION_REQUIRED,
FACE_UNLOCK_APP_ENABLED,
FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION,
ASSIST_GESTURE_ENABLED,
@@ -8964,8 +8970,6 @@ public final class Settings {
VALIDATORS.put(FACE_UNLOCK_KEYGUARD_ENABLED, FACE_UNLOCK_KEYGUARD_ENABLED_VALIDATOR);
VALIDATORS.put(FACE_UNLOCK_DISMISSES_KEYGUARD,
FACE_UNLOCK_DISMISSES_KEYGUARD_VALIDATOR);
- VALIDATORS.put(FACE_UNLOCK_ATTENTION_REQUIRED,
- FACE_UNLOCK_ATTENTION_REQUIRED_VALIDATOR);
VALIDATORS.put(FACE_UNLOCK_APP_ENABLED, FACE_UNLOCK_APP_ENABLED_VALIDATOR);
VALIDATORS.put(FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION,
FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION_VALIDATOR);
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index fafd8333f236..0e94abc0dcac 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -709,7 +709,9 @@ public class SettingsBackupTest {
Settings.Secure.CROSS_PROFILE_CALENDAR_ENABLED,
Settings.Secure.LOCATION_ACCESS_CHECK_INTERVAL_MILLIS,
Settings.Secure.LOCATION_ACCESS_CHECK_DELAY_MILLIS,
- Settings.Secure.BIOMETRIC_DEBUG_ENABLED);
+ Settings.Secure.BIOMETRIC_DEBUG_ENABLED,
+ Settings.Secure.FACE_UNLOCK_ATTENTION_REQUIRED,
+ Settings.Secure.FACE_UNLOCK_DIVERSITY_REQUIRED);
@Test
public void systemSettingsBackedUpOrBlacklisted() {
diff --git a/services/core/java/com/android/server/stats/StatsCompanionService.java b/services/core/java/com/android/server/stats/StatsCompanionService.java
index 10ed88f49231..44ed070fda23 100644
--- a/services/core/java/com/android/server/stats/StatsCompanionService.java
+++ b/services/core/java/com/android/server/stats/StatsCompanionService.java
@@ -2084,6 +2084,9 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
e.writeBoolean(Settings.Secure.getIntForUser(mContext.getContentResolver(),
Settings.Secure.FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION, 0,
userId) != 0);
+ e.writeBoolean(Settings.Secure.getIntForUser(mContext.getContentResolver(),
+ Settings.Secure.FACE_UNLOCK_DIVERSITY_REQUIRED, 1,
+ userId) != 0);
pulledData.add(e);
}