Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FingerprintManagerCompat method had issues with Samsung devices

Problem

java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=#####, uid=##### requires android.permission.INTERACT_ACROSS_USERS
    at android.os.Parcel.readException(Parcel.java:1620)
    at android.os.Parcel.readException(Parcel.java:1573)
    at android.hardware.fingerprint.IFingerprintService$Stub$Proxy.hasEnrolledFingerprints(IFingerprintService.java:503)
    at android.hardware.fingerprint.FingerprintManager.hasEnrolledFingerprints(FingerprintManager.java:768)
    at android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23.hasEnrolledFingerprints(FingerprintManagerCompatApi23.java:39)
    at android.support.v4.hardware.fingerprint.FingerprintManagerCompat$Api23FingerprintManagerCompatImpl.hasEnrolledFingerprints(FingerprintManagerCompat.java:239)
    at android.support.v4.hardware.fingerprint.FingerprintManagerCompat.hasEnrolledFingerprints(FingerprintManagerCompat.java:66)

This issue has only occurred on some Samsung devices:

  • Galaxy S6 Active (marinelteatt)
  • Galaxy On5 (on5ltemtr)
  • Galaxy J7(2016) (j7eltetmo)

(data from crash reports)


Current solution from research

After researching the issue, the only solution I've found is to add the following permission to the manifest:

<permission
    android:name="android.permission.INTERACT_ACROSS_USERS_FULL"
    android:protectionLevel="signature"/>

This seems odd and I'm not sure if this is the best or proper solution.


Question

Why is this exception being thrown? Is the above solution correct?

I would really like more information on this.

Thanks!

like image 440
AnxGotta Avatar asked Sep 07 '16 14:09

AnxGotta


1 Answers

I found a support thread with Samsung where it was mentioned that this was a Firmware issue with the devices.

LINK

I simply added a try/catch around the code to prevent the crashes.

This should be resolved in the Samsung Firmware update.

like image 159
AnxGotta Avatar answered Sep 25 '22 06:09

AnxGotta