set image type to image/* when setting wallpaper

This commit is contained in:
tibbi 2016-12-29 20:00:31 +01:00
parent 0383769c9e
commit e6bc2e4da7
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ fun Activity.shareMedia(media: List<Medium>) {
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) {