mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #1198 from deltachat/fix1197SoundUriCrashesNotification
Fix not trying to play a sound when -no sound- has been selected.
This commit is contained in:
@@ -286,10 +286,13 @@ abstract class MessageNotifier {
|
||||
}
|
||||
|
||||
private void playNotificationSound(Uri uri, boolean vibrate) {
|
||||
Ringtone ringtone = RingtoneManager.getRingtone(appContext, uri);
|
||||
if (ringtone!=null) {
|
||||
ringtone.play();
|
||||
}
|
||||
if(uri != null) {
|
||||
Ringtone ringtone = RingtoneManager.getRingtone(appContext, uri);
|
||||
|
||||
if (ringtone != null) {
|
||||
ringtone.play();
|
||||
}
|
||||
} // else we selected "no sound"
|
||||
|
||||
if (vibrate) {
|
||||
Vibrator v = (Vibrator) appContext.getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
||||
Reference in New Issue
Block a user