mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
not trying to play a sound when -no sound- has been selected.
This commit is contained in:
@@ -12,6 +12,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.b44t.messenger.DcMsg;
|
||||
|
||||
@@ -286,10 +287,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