From 0bb75eed1fae04e1be317bcd52aa1cc6ada90a7b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 29 Sep 2020 16:41:55 +0200 Subject: [PATCH] Finish what has been started on #1376: use Intent.ACTION_GET_CONTENT instead of Intent.ACTION_OPEN_DOCUMENT for other pickers --- CHANGES.md | 2 +- .../src/main/java/im/vector/lib/multipicker/AudioPicker.kt | 2 +- .../src/main/java/im/vector/lib/multipicker/FilePicker.kt | 2 +- .../src/main/java/im/vector/lib/multipicker/VideoPicker.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 56f22bd4a9..488bc5ca32 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,7 +9,7 @@ Improvements 🙌: - Small optimisation of scrolling experience in timeline (#2114) Bugfix 🐛: - - Improve support for image selection with intent changes (#1376) + - Improve support for image/audio/video/file selection with intent changes (#1376) - Fix Splash layout on small screens Translations 🗣: diff --git a/multipicker/src/main/java/im/vector/lib/multipicker/AudioPicker.kt b/multipicker/src/main/java/im/vector/lib/multipicker/AudioPicker.kt index 17c01bc8e3..c51084dd39 100644 --- a/multipicker/src/main/java/im/vector/lib/multipicker/AudioPicker.kt +++ b/multipicker/src/main/java/im/vector/lib/multipicker/AudioPicker.kt @@ -84,7 +84,7 @@ class AudioPicker(override val requestCode: Int) : Picker( } override fun createIntent(): Intent { - return Intent(Intent.ACTION_OPEN_DOCUMENT).apply { + return Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) putExtra(Intent.EXTRA_ALLOW_MULTIPLE, !single) type = "audio/*" diff --git a/multipicker/src/main/java/im/vector/lib/multipicker/FilePicker.kt b/multipicker/src/main/java/im/vector/lib/multipicker/FilePicker.kt index 296685886d..d5718b9951 100644 --- a/multipicker/src/main/java/im/vector/lib/multipicker/FilePicker.kt +++ b/multipicker/src/main/java/im/vector/lib/multipicker/FilePicker.kt @@ -64,7 +64,7 @@ class FilePicker(override val requestCode: Int) : Picker(re } override fun createIntent(): Intent { - return Intent(Intent.ACTION_OPEN_DOCUMENT).apply { + return Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) putExtra(Intent.EXTRA_ALLOW_MULTIPLE, !single) type = "*/*" diff --git a/multipicker/src/main/java/im/vector/lib/multipicker/VideoPicker.kt b/multipicker/src/main/java/im/vector/lib/multipicker/VideoPicker.kt index 7127e9defd..965c8e08e0 100644 --- a/multipicker/src/main/java/im/vector/lib/multipicker/VideoPicker.kt +++ b/multipicker/src/main/java/im/vector/lib/multipicker/VideoPicker.kt @@ -93,7 +93,7 @@ class VideoPicker(override val requestCode: Int) : Picker( } override fun createIntent(): Intent { - return Intent(Intent.ACTION_OPEN_DOCUMENT).apply { + return Intent(Intent.ACTION_GET_CONTENT).apply { addCategory(Intent.CATEGORY_OPENABLE) putExtra(Intent.EXTRA_ALLOW_MULTIPLE, !single) type = "video/*"