? = 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..391140b9f3 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===105
### 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 55ec0618dd..5b5f65e9dd 100644
--- a/vector/build.gradle
+++ b/vector/build.gradle
@@ -14,7 +14,7 @@ kapt {
// Note: 2 digits max for each value
ext.versionMajor = 1
ext.versionMinor = 1
-ext.versionPatch = 15
+ext.versionPatch = 17
static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'
@@ -148,6 +148,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"
@@ -343,7 +345,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"
@@ -405,6 +407,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'
@@ -412,6 +415,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/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml
index e71f355a23..df85e31208 100644
--- a/vector/src/main/AndroidManifest.xml
+++ b/vector/src/main/AndroidManifest.xml
@@ -224,6 +224,7 @@
+
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
+
+
+