mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
fix: Improve code
This commit is contained in:
parent
cb43a1b371
commit
16e6fd8fc2
@ -152,11 +152,10 @@ abstract class RecorderService : Service() {
|
|||||||
fun startRecording() {
|
fun startRecording() {
|
||||||
recordingStart = LocalDateTime.now()
|
recordingStart = LocalDateTime.now()
|
||||||
|
|
||||||
val notification = getNotificationHelper().buildStartingNotification()
|
|
||||||
ServiceCompat.startForeground(
|
ServiceCompat.startForeground(
|
||||||
this,
|
this,
|
||||||
NotificationHelper.RECORDER_CHANNEL_NOTIFICATION_ID,
|
NotificationHelper.RECORDER_CHANNEL_NOTIFICATION_ID,
|
||||||
notification,
|
getNotificationHelper().buildStartingNotification(),
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
|
ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user