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