Add missing exception handling in setDefaultAudible
Change-Id: I202a424d1fb1baa641cbb8ab616d53391106a3de
diff --git a/app/src/main/java/masquerade/substratum/utils/SoundUtils.java b/app/src/main/java/masquerade/substratum/utils/SoundUtils.java
index b47104c..8fce9e4 100644
--- a/app/src/main/java/masquerade/substratum/utils/SoundUtils.java
+++ b/app/src/main/java/masquerade/substratum/utils/SoundUtils.java
@@ -143,6 +143,7 @@
try {
RingtoneManager.setActualDefaultRingtoneUri(context, type, newUri);
} catch (Exception e) {
+ Log.e(TAG, "", e);
return false;
}
@@ -226,8 +227,11 @@
uri = Uri.withAppendedPath(Uri.parse(MEDIA_CONTENT_URI), id);
}
- if (uri != null) {
+ try {
RingtoneManager.setActualDefaultRingtoneUri(context, type, uri);
+ } catch (Exception e) {
+ Log.e(TAG, "", e);
+ return false;
}
return true;