From d37c824c14f32d1863ed9f86045e7c1ec2002e8c Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Tue, 20 Dec 2016 18:45:03 +0000 Subject: Update active fingerprint group when switching profiles Active group needs to be updated as soon as the user switches to a work profile app. This is to ensure that the authenticator Id returned by FingerprintService is always up-to-date, which is accessed by KeyStore to provision authentication-bound keys. Bug: 33459191 Test: manual Change-Id: I3641cd61400771df23f1174e1057ba388d6f8efb --- .../java/com/android/server/fingerprint/FingerprintService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/core/java/com/android/server/fingerprint/FingerprintService.java b/services/core/java/com/android/server/fingerprint/FingerprintService.java index 3f0ebf28bbfd..d4814ceac35c 100644 --- a/services/core/java/com/android/server/fingerprint/FingerprintService.java +++ b/services/core/java/com/android/server/fingerprint/FingerprintService.java @@ -1142,6 +1142,12 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe mHandler.obtainMessage(MSG_USER_SWITCHING, newUserId, 0 /* unused */) .sendToTarget(); } + + @Override + public void onForegroundProfileSwitch(int newProfileId) throws RemoteException { + mHandler.obtainMessage(MSG_USER_SWITCHING, newProfileId, 0 /* unused */) + .sendToTarget(); + } }, TAG); } catch (RemoteException e) { Slog.w(TAG, "Failed to listen for user switching event" ,e); -- cgit v1.2.3-59-g8ed1b