Use MimeTypes object instead of hard-coded strings.
This commit is contained in:
parent
04be1f0385
commit
4f32299280
14 changed files with 37 additions and 24 deletions
|
|
@ -24,5 +24,6 @@ android {
|
|||
|
||||
dependencies {
|
||||
api(projects.libraries.mediaupload.api)
|
||||
implementation(projects.libraries.core)
|
||||
implementation(projects.tests.testutils)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
package io.element.android.libraries.mediaupload.test
|
||||
|
||||
import android.net.Uri
|
||||
import io.element.android.libraries.core.mimetype.MimeTypes
|
||||
import io.element.android.libraries.matrix.api.media.AudioInfo
|
||||
import io.element.android.libraries.matrix.api.media.FileInfo
|
||||
import io.element.android.libraries.mediaupload.api.MediaPreProcessor
|
||||
|
|
@ -34,7 +35,7 @@ class FakeMediaPreProcessor : MediaPreProcessor {
|
|||
MediaUploadInfo.AnyFile(
|
||||
File("test"),
|
||||
FileInfo(
|
||||
mimetype = "*/*",
|
||||
mimetype = MimeTypes.Any,
|
||||
size = 999L,
|
||||
thumbnailInfo = null,
|
||||
thumbnailSource = null,
|
||||
|
|
@ -64,7 +65,7 @@ class FakeMediaPreProcessor : MediaPreProcessor {
|
|||
audioInfo = AudioInfo(
|
||||
duration = 1000.seconds,
|
||||
size = 1000,
|
||||
mimetype = "audio/ogg",
|
||||
mimetype = MimeTypes.Ogg,
|
||||
),
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue