removing redundant exists() checks, mkdirs already does this
This commit is contained in:
parent
8525925732
commit
23f8d05522
|
@ -40,7 +40,9 @@ internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor(
|
|||
) : RoomSyncEphemeralTemporaryStore {
|
||||
|
||||
private val workingDir: File by lazy {
|
||||
File(fileDirectory, "rr").also { it.mkdirs() }
|
||||
File(fileDirectory, "rr").also {
|
||||
it.mkdirs()
|
||||
}
|
||||
}
|
||||
|
||||
private val roomSyncEphemeralAdapter = moshi.adapter(RoomSyncEphemeral::class.java)
|
||||
|
|
|
@ -28,11 +28,9 @@ abstract class AbstractVoiceRecorder(
|
|||
) : VoiceRecorder {
|
||||
private val outputDirectory: File by lazy {
|
||||
File(context.cacheDir, "voice_records").also {
|
||||
if (!it.exists()) {
|
||||
it.mkdirs()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var mediaRecorder: MediaRecorder? = null
|
||||
private var outputFile: File? = null
|
||||
|
|
|
@ -29,11 +29,9 @@ class VoicePlayerHelper @Inject constructor(
|
|||
) {
|
||||
private val outputDirectory: File by lazy {
|
||||
File(context.cacheDir, "voice_records").also {
|
||||
if (!it.exists()) {
|
||||
it.mkdirs()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure the file is encoded using aac audio codec
|
||||
|
|
Loading…
Reference in New Issue