mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Do not call Notification.setSound with empty ringtone
Closes #6293 // FREEBIE
This commit is contained in:
parent
65c05e0388
commit
44bb2c7c72
@ -44,8 +44,8 @@ public abstract class AbstractNotificationBuilder extends NotificationCompat.Bui
|
||||
String defaultRingtoneName = TextSecurePreferences.getNotificationRingtone(context);
|
||||
boolean defaultVibrate = TextSecurePreferences.isNotificationVibrateEnabled(context);
|
||||
|
||||
if (ringtone != null) setSound(ringtone);
|
||||
else if (!TextUtils.isEmpty(defaultRingtoneName)) setSound(Uri.parse(defaultRingtoneName));
|
||||
if (ringtone == null && !TextUtils.isEmpty(defaultRingtoneName)) setSound(Uri.parse(defaultRingtoneName));
|
||||
else if (ringtone != null && !ringtone.toString().isEmpty()) setSound(ringtone);
|
||||
|
||||
if (vibrate == RecipientPreferenceDatabase.VibrateState.ENABLED ||
|
||||
(vibrate == RecipientPreferenceDatabase.VibrateState.DEFAULT && defaultVibrate))
|
||||
|
Loading…
Reference in New Issue
Block a user