From e71f650dc0c9dd67d7b05278704bfcaae8b6a397 Mon Sep 17 00:00:00 2001
From: ThomasSession <thomas.r@getsession.org>
Date: Fri, 2 Aug 2024 08:44:39 +1000
Subject: [PATCH] Update
 app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt

Co-authored-by: Andrew <andrewgallasch@gmail.com>
---
 .../org/thoughtcrime/securesms/service/WebRtcCallService.kt | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt b/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt
index 6ee33721e8..78f1a55470 100644
--- a/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt
+++ b/app/src/main/java/org/thoughtcrime/securesms/service/WebRtcCallService.kt
@@ -730,11 +730,7 @@ class WebRtcCallService : LifecycleService(), CallManager.WebRtcListener {
                 this,
                 CallNotificationBuilder.WEBRTC_NOTIFICATION,
                 CallNotificationBuilder.getCallInProgressNotification(this, type, recipient),
-                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
-                    ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
-                } else {
-                    0
-                }
+                if (Build.VERSION.SDK_INT >= 30) ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE else 0
             )
         } catch (e: IllegalStateException) {
             Log.e(TAG, "Failed to setCallInProgressNotification as a foreground service for type: ${type}, trying to update instead", e)