diff options
author | Allan Wang <me@allanwang.ca> | 2019-06-13 17:02:22 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-06-13 17:02:22 -0700 |
commit | 682227c17b46ff7957f9399b7f610d52f06c1428 (patch) | |
tree | 1a591311ab883d7320f0ff87117638b87d4068c0 /app/src/main/kotlin/com/pitchedapps/frost/services | |
parent | 5094c9f259bdca4f6be7472016cceeb289dae21e (diff) | |
download | frost-682227c17b46ff7957f9399b7f610d52f06c1428.tar.gz frost-682227c17b46ff7957f9399b7f610d52f06c1428.tar.bz2 frost-682227c17b46ff7957f9399b7f610d52f06c1428.zip |
Document uri parse usage for ringtones
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/services')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt index bba2a9a1..96c601e4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/NotificationUtils.kt @@ -97,6 +97,7 @@ fun NotificationCompat.Builder.setFrostAlert(enable: Boolean, ringtone: String): var defaults = 0 if (Prefs.notificationVibrate) defaults = defaults or Notification.DEFAULT_VIBRATE if (Prefs.notificationSound) { + // Ringtones have uris of format /content:/media/...; Uri.parse is okay if (ringtone.isNotBlank()) setSound(Uri.parse(ringtone)) else defaults = defaults or Notification.DEFAULT_SOUND } |