mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-19 07:15:25 +02:00
fix: Update AudioRecorderService to new batches folder
This commit is contained in:
parent
76b384ffb6
commit
4126dded6e
@ -1,6 +1,7 @@
|
|||||||
package app.myzel394.alibi.services
|
package app.myzel394.alibi.services
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.content.Context.AUDIO_SERVICE
|
||||||
import android.content.pm.ServiceInfo
|
import android.content.pm.ServiceInfo
|
||||||
import android.media.AudioDeviceCallback
|
import android.media.AudioDeviceCallback
|
||||||
import android.media.AudioDeviceInfo
|
import android.media.AudioDeviceInfo
|
||||||
@ -11,6 +12,7 @@ import android.os.Build
|
|||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import androidx.core.app.ServiceCompat
|
import androidx.core.app.ServiceCompat
|
||||||
|
import androidx.core.content.ContextCompat.getSystemService
|
||||||
import app.myzel394.alibi.NotificationHelper
|
import app.myzel394.alibi.NotificationHelper
|
||||||
import app.myzel394.alibi.db.AppSettings
|
import app.myzel394.alibi.db.AppSettings
|
||||||
import app.myzel394.alibi.db.RecordingInformation
|
import app.myzel394.alibi.db.RecordingInformation
|
||||||
@ -21,8 +23,8 @@ import app.myzel394.alibi.ui.utils.MicrophoneInfo
|
|||||||
import java.lang.IllegalStateException
|
import java.lang.IllegalStateException
|
||||||
|
|
||||||
class AudioRecorderService :
|
class AudioRecorderService :
|
||||||
IntervalRecorderService<RecordingInformation>() {
|
IntervalRecorderService<RecordingInformation, AudioBatchesFolder>() {
|
||||||
override var batchesFolder: BatchesFolder = AudioBatchesFolder.viaInternalFolder(this)
|
override var batchesFolder = AudioBatchesFolder.viaInternalFolder(this)
|
||||||
|
|
||||||
private val handler = Handler(Looper.getMainLooper())
|
private val handler = Handler(Looper.getMainLooper())
|
||||||
|
|
||||||
@ -181,7 +183,10 @@ class AudioRecorderService :
|
|||||||
when (batchesFolder.type) {
|
when (batchesFolder.type) {
|
||||||
BatchesFolder.BatchType.INTERNAL -> {
|
BatchesFolder.BatchType.INTERNAL -> {
|
||||||
setOutputFile(
|
setOutputFile(
|
||||||
batchesFolder.asInternalGetOutputPath(counter, audioSettings.fileExtension)
|
batchesFolder.asInternalGetFile(
|
||||||
|
counter,
|
||||||
|
audioSettings.fileExtension
|
||||||
|
).absolutePath
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user