Merge "Initialize biometric settings for user" into qt-dev

am: f688a1b6f6

Change-Id: I36943aa74bf0b6439345baaec009fc1fa36824d0
This commit is contained in:
Kevin Chyn
2019-05-15 22:57:47 -07:00
committed by android-build-merger

View File

@@ -475,7 +475,7 @@ public class BiometricService extends SystemService {
DEFAULT_KEYGUARD_ENABLED ? 1 : 0 /* default */, DEFAULT_KEYGUARD_ENABLED ? 1 : 0 /* default */,
userId) != 0); userId) != 0);
if (userId == ActivityManager.getCurrentUser()) { if (userId == ActivityManager.getCurrentUser() && !selfChange) {
notifyEnabledOnKeyguardCallbacks(userId); notifyEnabledOnKeyguardCallbacks(userId);
} }
} else if (FACE_UNLOCK_APP_ENABLED.equals(uri)) { } else if (FACE_UNLOCK_APP_ENABLED.equals(uri)) {
@@ -494,17 +494,25 @@ public class BiometricService extends SystemService {
} }
boolean getFaceEnabledOnKeyguard() { boolean getFaceEnabledOnKeyguard() {
return mFaceEnabledOnKeyguard.getOrDefault( final int user = ActivityManager.getCurrentUser();
ActivityManager.getCurrentUser(), DEFAULT_KEYGUARD_ENABLED); if (!mFaceEnabledOnKeyguard.containsKey(user)) {
onChange(true /* selfChange */, FACE_UNLOCK_KEYGUARD_ENABLED, user);
}
return mFaceEnabledOnKeyguard.get(user);
} }
boolean getFaceEnabledForApps(int userId) { boolean getFaceEnabledForApps(int userId) {
if (!mFaceEnabledForApps.containsKey(userId)) {
onChange(true /* selfChange */, FACE_UNLOCK_APP_ENABLED, userId);
}
return mFaceEnabledForApps.getOrDefault(userId, DEFAULT_APP_ENABLED); return mFaceEnabledForApps.getOrDefault(userId, DEFAULT_APP_ENABLED);
} }
boolean getFaceAlwaysRequireConfirmation(int userId) { boolean getFaceAlwaysRequireConfirmation(int userId) {
return mFaceAlwaysRequireConfirmation if (!mFaceAlwaysRequireConfirmation.containsKey(userId)) {
.getOrDefault(userId, DEFAULT_ALWAYS_REQUIRE_CONFIRMATION); onChange(true /* selfChange */, FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION, userId);
}
return mFaceAlwaysRequireConfirmation.get(userId);
} }
void notifyEnabledOnKeyguardCallbacks(int userId) { void notifyEnabledOnKeyguardCallbacks(int userId) {