10

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!

AnxGotta
  • 1,006
  • 7
  • 28
  • Same issue but unable to reproduce on my S6. Did you find a solution or some more information about this issue? – jujujuijk Sep 27 '16 at 10:37
  • Samsung made some statements about it being a firmware issue and they should have a fix soon. I just added a try/catch around the check to handle the bug and hopefully the users get the update soon. @jujujuijk – AnxGotta Sep 27 '16 at 13:27
  • Ok thanks for the news @AnxGotta , hope we'll get this update soon – jujujuijk Oct 04 '16 at 09:35

2 Answers2

3

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.

AnxGotta
  • 1,006
  • 7
  • 28
0

Finally I found a way to reproduce this issue. First you need to register a fingerprint on the device and set the lockscreen to none. Then I had to restart the device and open my app calling hasEnrolledFingerprints().

As stated by @AnxGotta it seems to be caused by a Firmware issue. However I found a cleaner solution then adding a try catch. I just needed to call isHardwareDetected() before hasEnrolledFingerprints().

Wirling
  • 4,810
  • 3
  • 48
  • 78