From c1f7f3eadaab7e19142bd848bf51dbdf03bcda91 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 9 Apr 2020 15:49:13 +0200 Subject: [PATCH] improving file type recognition at third party intents --- .../gallery/pro/activities/PhotoVideoActivity.kt | 5 +++-- build.gradle | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt index 96dbc0fde..50600c6b0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/PhotoVideoActivity.kt @@ -150,9 +150,10 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList showSystemUI(true) val bundle = Bundle() val file = File(mUri.toString()) + val intentType = intent.type ?: "" val type = when { - filename.isVideoFast() -> TYPE_VIDEOS - filename.isGif() -> TYPE_GIFS + filename.isVideoFast() || intentType.startsWith("video/") -> TYPE_VIDEOS + filename.isGif() || intentType.equals("image/gif", true) -> TYPE_GIFS filename.isRawFast() -> TYPE_RAWS filename.isSvg() -> TYPE_SVGS file.isPortrait() -> TYPE_PORTRAITS diff --git a/build.gradle b/build.gradle index 8613df43f..250b2adb5 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.1' + classpath 'com.android.tools.build:gradle:3.6.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" if (is_proprietary) { classpath 'ly.img.android.pesdk:plugin:7.1.12'