From 16e6fd8fc208e238a7200e096ea279691505bc7a Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:49:15 +0200 Subject: [PATCH] fix: Improve code --- .../main/java/app/myzel394/alibi/services/RecorderService.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt b/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt index 1024f87..f3a24ce 100644 --- a/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt +++ b/app/src/main/java/app/myzel394/alibi/services/RecorderService.kt @@ -152,11 +152,10 @@ abstract class RecorderService : Service() { fun startRecording() { recordingStart = LocalDateTime.now() - val notification = getNotificationHelper().buildStartingNotification() ServiceCompat.startForeground( this, NotificationHelper.RECORDER_CHANNEL_NOTIFICATION_ID, - notification, + getNotificationHelper().buildStartingNotification(), if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE } else {