I have a weird crash reported by Firebase Crashlytics for one of my function:
Fatal Exception: java.lang.SecurityException
You need INTERACT_ACROSS_USERS or MANAGE_USERS permission to: check isUserUnlockingOrUnlocked
android.os.Parcel.createExceptionOrNull (Parcel.java:2376)
android.app.Activity.startActivity (Activity.java:5727)
com.*.*.*.utils.IntentUtil.openFileInVideoPlayer (IntentUtil.java:3)
It's just an intent to open a video file in a video player app
fun openFileInVideoPlayer(caller: Activity, file: File) {
val uri = GeneralUtil.getUri(caller.applicationContext, file) ?: return
val intent = Intent(Intent.ACTION_VIEW).apply {
setDataAndType(
uri,
MimeTypeMap.getSingleton().getMimeTypeFromExtension(file.extension)
)
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_ACTIVITY_CLEAR_TOP
}
if (intent.canBeHandled(caller.packageManager)) {
caller.startActivity(intent)
} else {
openAppInGooglePlay(caller, VLC_PACKAGE)
}
}
I don't understand how these permissions can be related to this.