Allow passing null as a sound

As per this answer: https://stackoverflow.com/a/46634508/306764
This commit is contained in:
Gilad Novik
2018-04-22 14:44:32 +03:00
committed by GitHub
parent 33d2fb7069
commit 89c6636434

View File

@@ -560,7 +560,9 @@ public class RNFirebaseNotificationManager {
}
private Uri getSound(String sound) {
if (sound.contains("://")) {
if (sound == null)
return null;
else if (sound.contains("://")) {
return Uri.parse(sound);
} else if (sound.equalsIgnoreCase("default")) {
return RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);