mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
Do not play notification sounds on Oreo or later
On devices with Android 8.0 (Oreo) or later, notification sound will be handled by the system, if notifications have not been disabled by the user. Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
This commit is contained in:
parent
89a8ca630d
commit
4a5f6cf1fe
@ -491,6 +491,11 @@ public class NotificationWorker extends Worker {
|
||||
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
|
||||
notificationManager.notify(notificationId, notification);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// On devices with Android 8.0 (Oreo) or later, notification sound will be handled by the system
|
||||
// if notifications have not been disabled by the user.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!notification.category.equals(Notification.CATEGORY_CALL) || !muteCall) {
|
||||
String ringtonePreferencesString;
|
||||
|
Loading…
Reference in New Issue
Block a user