From e6bc2e4da757fd596b30c4864e13067d98038d23 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 29 Dec 2016 20:00:31 +0100 Subject: [PATCH] set image type to image/* when setting wallpaper --- .../kotlin/com/simplemobiletools/gallery/extensions/activity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt index 1fa1c9da4..dab94cb14 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -51,7 +51,7 @@ fun Activity.shareMedia(media: List) { fun Activity.setAsWallpaper(file: File) { val intent = Intent(Intent.ACTION_ATTACH_DATA) val uri = Uri.fromFile(file) - intent.setDataAndType(uri, file.getMimeType("image/jpeg")) + intent.setDataAndType(uri, file.getMimeType("image/*")) val chooser = Intent.createChooser(intent, getString(R.string.set_as_wallpaper_with)) if (intent.resolveActivity(packageManager) != null) {