? = null
) : MultiPickerBaseType
diff --git a/multipicker/src/main/java/im/vector/lib/multipicker/utils/ContentResolverUtil.kt b/multipicker/src/main/java/im/vector/lib/multipicker/utils/ContentResolverUtil.kt
index a1982b0bbc..78136c274a 100644
--- a/multipicker/src/main/java/im/vector/lib/multipicker/utils/ContentResolverUtil.kt
+++ b/multipicker/src/main/java/im/vector/lib/multipicker/utils/ContentResolverUtil.kt
@@ -111,7 +111,7 @@ internal fun Uri.toMultiPickerVideoType(context: Context): MultiPickerVideoType?
}
}
-internal fun Uri.toMultiPickerAudioType(context: Context): MultiPickerAudioType? {
+fun Uri.toMultiPickerAudioType(context: Context): MultiPickerAudioType? {
val projection = arrayOf(
MediaStore.Audio.Media.DISPLAY_NAME,
MediaStore.Audio.Media.SIZE
@@ -141,7 +141,7 @@ internal fun Uri.toMultiPickerAudioType(context: Context): MultiPickerAudioType?
MultiPickerAudioType(
name,
size,
- context.contentResolver.getType(this),
+ sanitize(context.contentResolver.getType(this)),
this,
duration
)
@@ -150,3 +150,11 @@ internal fun Uri.toMultiPickerAudioType(context: Context): MultiPickerAudioType?
}
}
}
+
+private fun sanitize(type: String?): String? {
+ if (type == "application/ogg") {
+ // Not supported on old system
+ return "audio/ogg"
+ }
+ return type
+}
diff --git a/tools/check/forbidden_strings_in_code.txt b/tools/check/forbidden_strings_in_code.txt
index ba9dec0877..70eea6c26e 100644
--- a/tools/check/forbidden_strings_in_code.txt
+++ b/tools/check/forbidden_strings_in_code.txt
@@ -162,7 +162,7 @@ Formatter\.formatShortFileSize===1
# android\.text\.TextUtils
### This is not a rule, but a warning: the number of "enum class" has changed. For Json classes, it is mandatory that they have `@JsonClass(generateAdapter = false)`. If the enum is not used as a Json class, change the value in file forbidden_strings_in_code.txt
-enum class===102
+enum class===103
### Do not import temporary legacy classes
import org.matrix.android.sdk.internal.legacy.riot===3
diff --git a/vector/build.gradle b/vector/build.gradle
index b57d7eef33..c88098207f 100644
--- a/vector/build.gradle
+++ b/vector/build.gradle
@@ -144,6 +144,8 @@ android {
buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping"
+ buildConfigField "Long", "VOICE_MESSAGE_DURATION_LIMIT_MS", "120_000L"
+
// If set, MSC3086 asserted identity messages sent on VoIP calls will cause the call to appear in the room corresponding to the asserted identity.
// This *must* only be set in trusted environments.
buildConfigField "Boolean", "handleCallAssertedIdentityEvents", "false"
@@ -339,7 +341,7 @@ dependencies {
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation "androidx.fragment:fragment-ktx:$fragment_version"
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.0-beta02'
implementation "androidx.sharetarget:sharetarget:1.1.0"
implementation 'androidx.core:core-ktx:1.6.0'
implementation "androidx.media:media:1.4.0"
@@ -401,6 +403,7 @@ dependencies {
implementation "androidx.autofill:autofill:$autofill_version"
implementation 'jp.wasabeef:glide-transformations:4.3.0'
implementation 'com.github.vector-im:PFLockScreen-Android:1.0.0-beta12'
+ implementation 'com.github.Armen101:AudioRecordView:1.0.5'
// Custom Tab
implementation 'androidx.browser:browser:1.3.0'
@@ -408,6 +411,9 @@ dependencies {
// Passphrase strength helper
implementation 'com.nulab-inc:zxcvbn:1.5.2'
+ // To convert voice message on old platforms
+ implementation 'com.arthenica:ffmpeg-kit-audio:4.4.LTS'
+
//Alerter
implementation 'com.tapadoo.android:alerter:7.0.1'
diff --git a/vector/src/main/assets/open_source_licenses.html b/vector/src/main/assets/open_source_licenses.html
index ffa328291c..490de1f23a 100755
--- a/vector/src/main/assets/open_source_licenses.html
+++ b/vector/src/main/assets/open_source_licenses.html
@@ -391,6 +391,11 @@ SOFTWARE.
Copyright (c) 2017-present, dialog LLC <info@dlg.im>
+
+ Armen101 / AudioRecordView
+
+ Copyright 2019 Armen Gevorgyan
+
Apache License
@@ -590,5 +595,18 @@ Apache License
+
+ GNU GENERAL PUBLIC LICENSE
+
+ Version 3, 29 June 2007
+
+
+ -
+ ffmpeg-kit
+
+ Copyright (c) 2021 Taner Sener
+
+
+