Merge \\"Remove work fingerprints when primary profile lock is removed\\" into nyc-dev am: 42cbbc3052

am: 5ec65517a6

Change-Id: Iaf25d93b2926b985d8cad2c9e9923c819486d21e
This commit is contained in:
Ricky Wai
2016-06-15 16:42:05 +00:00
committed by android-build-merger

View File

@@ -655,8 +655,8 @@ public class ChooseLockGeneric extends SettingsActivity {
} }
private void removeAllFingerprintForUserAndFinish(final int userId) { private void removeAllFingerprintForUserAndFinish(final int userId) {
if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected() if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected()) {
&& mFingerprintManager.hasEnrolledFingerprints(userId)) { if (mFingerprintManager.hasEnrolledFingerprints(userId)) {
mFingerprintManager.setActiveUser(userId); mFingerprintManager.setActiveUser(userId);
// For the purposes of M and N, groupId is the same as userId. // For the purposes of M and N, groupId is the same as userId.
final int groupId = userId; final int groupId = userId;
@@ -679,6 +679,11 @@ public class ChooseLockGeneric extends SettingsActivity {
} }
} }
}); });
} else {
// No fingerprints in this user, we may also want to delete managed profile
// fingerprints
removeManagedProfileFingerprintsAndFinishIfNecessary(userId);
}
} else { } else {
// The removal callback will call finish, once all fingerprints are removed. // The removal callback will call finish, once all fingerprints are removed.
// We need to wait for that to occur, otherwise, the UI will still show that // We need to wait for that to occur, otherwise, the UI will still show that