diff options
| author | 2019-04-15 14:11:58 -0700 | |
|---|---|---|
| committer | 2019-04-15 14:34:30 -0700 | |
| commit | c78071f29a2f13b977d54b0bfcae46d8c7f36b13 (patch) | |
| tree | e164902a5040f86420b61b96501139952675c2be | |
| parent | 0a510f8bbf8e31f8902aafc89439f6b97babcb30 (diff) | |
Cache and log enrollment settings
Bug: 130370995
Test: Builds
Change-Id: Id23b6befe62cf5ea3a4468169f36da191ae97cc9
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); } |