FileUriExposedException for custom notification sound
- Android version: 7.1.2
- Phone model: Xiaomi Redmi 5A (riva)
- Briar version: 1.0.1 (1833efa5)
Stacktrace:
android.os.FileUriExposedException: file:///storage/emulated/0/Ringtones/Unlock.wav exposed beyond app through Notification.sound
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1796)
at android.net.Uri.checkFileUriExposed(Uri.java:2346)
at android.app.NotificationManager.notifyAsUser(NotificationManager.java:300)
at android.app.NotificationManager.notify(NotificationManager.java:284)
at android.app.NotificationManager.notify(NotificationManager.java:268)
at org.briarproject.briar.android.AndroidNotificationManagerImpl.updateGroupMessageNotification(AndroidNotificationManagerImpl.java:439)
at org.briarproject.briar.android.AndroidNotificationManagerImpl.lambda$showGroupMessageNotification$5$AndroidNotificationManagerImpl(AndroidNotificationManagerImpl.java:383)
at org.briarproject.briar.android.AndroidNotificationManagerImpl$$Lambda$6.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6205)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
I don't know why StrictMode threw this exception rather than just logging it, but judging by the package name this was a release build.