set the default mimetype to image/jpeg

This commit is contained in:
tibbi 2016-11-14 23:10:57 +01:00
parent bfb2bdd5ba
commit 35fb696d30

View file

@ -203,10 +203,11 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
private fun getMimeType(url: String): String? { private fun getMimeType(url: String): String? {
val extension = MimeTypeMap.getFileExtensionFromUrl(url) val extension = MimeTypeMap.getFileExtensionFromUrl(url)
if (extension != null) { return if (extension != null) {
return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension) MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension)
} else {
"image/jpeg"
} }
return null
} }
private fun setAsWallpaper() { private fun setAsWallpaper() {