Merge "notifyEnabledOnKeyguardCallbacks when user switches" into qt-dev am: dcfe0d338b
am: e8e3ea329e
Change-Id: I471dab64191cddb7b5548e85f3825ebaef5ebf89
This commit is contained in:
@@ -405,12 +405,7 @@ public class BiometricService extends SystemService {
|
||||
userId) != 0);
|
||||
|
||||
if (userId == ActivityManager.getCurrentUser()) {
|
||||
List<EnabledOnKeyguardCallback> callbacks = mEnabledOnKeyguardCallbacks;
|
||||
for (int i = 0; i < callbacks.size(); i++) {
|
||||
callbacks.get(i).notify(BiometricSourceType.FACE,
|
||||
mFaceEnabledOnKeyguard.getOrDefault(userId,
|
||||
DEFAULT_KEYGUARD_ENABLED));
|
||||
}
|
||||
notifyEnabledOnKeyguardCallbacks(userId);
|
||||
}
|
||||
} else if (FACE_UNLOCK_APP_ENABLED.equals(uri)) {
|
||||
mFaceEnabledForApps.put(userId, Settings.Secure.getIntForUser(
|
||||
@@ -440,6 +435,15 @@ public class BiometricService extends SystemService {
|
||||
return mFaceAlwaysRequireConfirmation
|
||||
.getOrDefault(userId, DEFAULT_ALWAYS_REQUIRE_CONFIRMATION);
|
||||
}
|
||||
|
||||
void notifyEnabledOnKeyguardCallbacks(int userId) {
|
||||
List<EnabledOnKeyguardCallback> callbacks = mEnabledOnKeyguardCallbacks;
|
||||
for (int i = 0; i < callbacks.size(); i++) {
|
||||
callbacks.get(i).notify(BiometricSourceType.FACE,
|
||||
mFaceEnabledOnKeyguard.getOrDefault(userId,
|
||||
DEFAULT_KEYGUARD_ENABLED));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final class EnabledOnKeyguardCallback implements IBinder.DeathRecipient {
|
||||
@@ -787,6 +791,7 @@ public class BiometricService extends SystemService {
|
||||
@Override
|
||||
public void onUserSwitchComplete(int newUserId) {
|
||||
mSettingObserver.updateContentObserver();
|
||||
mSettingObserver.notifyEnabledOnKeyguardCallbacks(newUserId);
|
||||
}
|
||||
}, BiometricService.class.getName()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user