mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
set the default mimetype to image/jpeg
This commit is contained in:
parent
bfb2bdd5ba
commit
35fb696d30
1 changed files with 4 additions and 3 deletions
|
@ -203,10 +203,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
|
||||
private fun getMimeType(url: String): String? {
|
||||
val extension = MimeTypeMap.getFileExtensionFromUrl(url)
|
||||
if (extension != null) {
|
||||
return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension)
|
||||
return if (extension != null) {
|
||||
MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension)
|
||||
} else {
|
||||
"image/jpeg"
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
private fun setAsWallpaper() {
|
||||
|
|
Loading…
Reference in a new issue