improving file type recognition at third party intents
This commit is contained in:
parent
06c393be7f
commit
c1f7f3eada
|
@ -150,9 +150,10 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
showSystemUI(true)
|
showSystemUI(true)
|
||||||
val bundle = Bundle()
|
val bundle = Bundle()
|
||||||
val file = File(mUri.toString())
|
val file = File(mUri.toString())
|
||||||
|
val intentType = intent.type ?: ""
|
||||||
val type = when {
|
val type = when {
|
||||||
filename.isVideoFast() -> TYPE_VIDEOS
|
filename.isVideoFast() || intentType.startsWith("video/") -> TYPE_VIDEOS
|
||||||
filename.isGif() -> TYPE_GIFS
|
filename.isGif() || intentType.equals("image/gif", true) -> TYPE_GIFS
|
||||||
filename.isRawFast() -> TYPE_RAWS
|
filename.isRawFast() -> TYPE_RAWS
|
||||||
filename.isSvg() -> TYPE_SVGS
|
filename.isSvg() -> TYPE_SVGS
|
||||||
file.isPortrait() -> TYPE_PORTRAITS
|
file.isPortrait() -> TYPE_PORTRAITS
|
||||||
|
|
|
@ -13,7 +13,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
if (is_proprietary) {
|
if (is_proprietary) {
|
||||||
classpath 'ly.img.android.pesdk:plugin:7.1.12'
|
classpath 'ly.img.android.pesdk:plugin:7.1.12'
|
||||||
|
|
Loading…
Reference in New Issue