easydeviceinfo
easydeviceinfo copied to clipboard
android.permission.INTERACT_ACROSS_USERS Crash on Marshmallow (Android 6.1)
Calling areFingerprintsEnrolled
causes a crash for Samsung users on Android Marshmallow (6.1).
Error:
Caused by java.lang.SecurityException Permission Denial: getCurrentUser() from pid=9160, uid=10126 requires android.permission.INTERACT_ACROSS_USERS github.nisrulz.easydeviceinfo.base.EasyFingerprintMod.areFingerprintsEnrolled
Stacktrace:
android.os.Parcel.readException (Parcel.java:1621)
android.os.Parcel.readException (Parcel.java:1574)
android.hardware.fingerprint.IFingerprintService$Stub$Proxy.hasEnrolledFingerprints (IFingerprintService.java:503)
android.hardware.fingerprint.FingerprintManager.hasEnrolledFingerprints (FingerprintManager.java:776)
github.nisrulz.easydeviceinfo.base.EasyFingerprintMod.areFingerprintsEnrolled (EasyFingerprintMod.java:79)
For now, my solution is to disable fingerprint check for users on Marshmallow. Any ideas what might be happening?
Looks like it cannot request the permission at all because it needs to be signed by firmware key
I think I will have to code around this issue.
Thank you for reporting. I will add a fix soon.
Any update on a fix? I've found few more bugs in this library so I'll probably submit a PR for a fix.
Actually things have changed and the Fingerprint API is deprecated. I have to now re-implement this using the Biometric API which would possibly take care of all such scenario (atleast that is what Google seems to claims)
Hmmm, please share your findings when you look into it. I haven't looked into the Biometrics because I have a library that uses Fingerprint and suspect it would be a pain to migrate.