improving file type recognition at third party intents

This commit is contained in:
tibbi 2020-04-09 15:49:13 +02:00
parent 06c393be7f
commit c1f7f3eada
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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'