title: Fingerprint crash on specific Samsung devices
body: <p>I've recently released a new app which contains support for authentication via fingerprint.</p>
  
  <p>This has worked fine on all of our test devices:<br>
   - OnePlus Three<br>
   - OnePlus Five<br>
   - Samsung S6 Edge<br>
   - Samsung S7<br>
   - Samsung S8  </p>
  
  <p>But when released, we began getting crashes from Fabric with this stack trace:</p>
  
  <pre><code>Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.our.app/com.our.app.ui.LoginActivity}: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=30208, uid=10038 requires android.permission.INTERACT_ACROSS_USERS
         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3319)
         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
         at android.app.ActivityThread.access$1100(ActivityThread.java:229)
         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
         at android.os.Handler.dispatchMessage(Handler.java:102)
         at android.os.Looper.loop(Looper.java:148)
         at android.app.ActivityThread.main(ActivityThread.java:7325)
         at java.lang.reflect.Method.invoke(Method.java)
         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
  Caused by java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=30208, uid=10038 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:776)
         at com.our.app.fingerprint.handler.FingerprintHandler.canUseFingerprint(SourceFile:65)
         at com.our.app.Client.canUseFingerprint(SourceFile:335)
         at com.our.app.ui.LoginActivity.updateViewVisibilityBasedOnState(SourceFile:501)
         at com.our.app.ui.LoginActivity.updateViewVisibilityBasedOnState(SourceFile:472)
         at com.our.app.ui.LoginActivity.continueWithOnCreateLogic(SourceFile:399)
         at com.our.app.ui.LoginActivity.onCreate(SourceFile:321)
         at android.app.Activity.performCreate(Activity.java:6904)
         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136)
         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266)
         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
         at android.app.ActivityThread.access$1100(ActivityThread.java:229)
         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
         at android.os.Handler.dispatchMessage(Handler.java:102)
         at android.os.Looper.loop(Looper.java:148)
         at android.app.ActivityThread.main(ActivityThread.java:7325)
         at java.lang.reflect.Method.invoke(Method.java)
         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
  </code></pre>
  
  <p>According to Fabric, these devices are experiencing the crash:<br>
  - Galaxy A5<br>
  - Galaxy S5 Mini<br>
  - Galaxy A3(2016) </p>
  
  <p>All of them are running Android 6.0.1.</p>
  
  <p>Seeing as they're all Samsung devices, I began suspecting that Knox could be the issue, even though it isn't specifically listed anywhere in the stacktrace. But i have no idea on how to work around it, or fix it.</p>
  
  <p>I found a similar issue posted on Samsung's own website, but without a fix:<br>
  <a href="https://seap.samsung.com/forum-topic/getting-javalangsecurityexception-permission-denial" rel="noreferrer">https://seap.samsung.com/forum-topic/getting-javalangsecurityexception-permission-denial</a></p>
  
  <p>The permission that's named in the stacktrace is a system permission, which no user apps can get. Only system apps can.</p>
  
  <p>Does anyone have an idea on how to fix this?</p>