I have the following code-lines:
FingerprintManager fm = activity.getSystemService(FingerprintManager.class);
fm.isHardwareDetected();
At this Point, Android Studio complains about a missing permssionCheck (checkSelfPermission).
Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with
checkPermission
) or explicitly handle a potentialSecurityException
However, as I understand the Documentation, USE_FINGERPRINT (required by FingerprintManager) is not a "dangerous" permission and thus is granted at install time. If I suppress the AndroidStudio warning everything works fine on my test devices. Is this a bogus warning?
This clearly seems to be an AndroidStudio bug. I have added
//noinspection MissingPermission
to supress this warning, and there are no negative consequences.