FingerprintService: check current user correctly
FingerprintService maintains a mCurrentUserId field which keeps track of the active group/user id in the underlying daemon. This field, however, can become invalid after the daemon crashes and before FingerprintService reconnects to a new daemon. (mCurrentUserId is only set upon updateActiveGroup().) Previously, mCurrentUserId is wrongly used in the logic of isCurrentUserOrProfile(), resulting in false negatives when mCurrentUserId is invalid. In this CL, we use ActivityManager.getCurrentUser() instead, which has no dependency on the state of the daemon. This will also reduce the complexity around mCurrentUserId, and hopefully will make future clean-ups easier. Test: manually kill daemon and verify fingerprint functions normally Bug: 36152864 Change-Id: I4250fad0e7c88bde95a1da1c89e71b4931ee3b8a
Loading
Please register or sign in to comment