Prevent crash

This commit is contained in:
M66B
2023-02-10 08:34:31 +01:00
parent f59aef881e
commit c5aa421d2f
7 changed files with 37 additions and 9 deletions

View File

@@ -871,7 +871,7 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared
try {
getContext().getContentResolver().takePersistableUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
if (!Helper.isPersisted(getContext(), uri, true, false))
Log.unexpectedError(getParentFragmentManager(),
Log.unexpectedError(FragmentOptionsNotifications.this,
new IllegalStateException("No permission granted to access selected sound " + uri));
} catch (Throwable ex) {
Log.w(ex);