From 772a28eb9eaef6085a35f4d01983756a2a37a2f4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 26 Nov 2018 10:54:52 +0100 Subject: [PATCH] disable default notification sounds for incoming calls --- .../contacts/pro/services/DialerCallService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/DialerCallService.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/DialerCallService.kt index 37352125..ed37d17e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/DialerCallService.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/services/DialerCallService.kt @@ -58,6 +58,7 @@ class DialerCallService : Service() { NotificationChannel(channelId, name, importance).apply { enableLights(false) enableVibration(false) + setSound(null, null) notificationManager.createNotificationChannel(this) } } @@ -71,6 +72,7 @@ class DialerCallService : Service() { .setPriority(NotificationCompat.PRIORITY_MAX) .setOngoing(true) .setChannelId(channelId) + .setSound(null) .setUsesChronometer(callStatus == Call.STATE_ACTIVE) .addAction(0, getString(R.string.decline_call), getDeclineCallIntent()) .addAction(0, getString(R.string.answer_call), getAnswerCallIntent())