From 7ebfeeb66a1513780a80cc0be5a92c79b7c86e81 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 22 Mar 2017 22:33:54 +0100 Subject: [PATCH] add a device version check at SetWallpaper activity --- .../gallery/activities/SetWallpaperActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt index a0381cd99..adb99b15d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt @@ -5,6 +5,7 @@ import android.app.WallpaperManager import android.content.Intent import android.graphics.Bitmap import android.net.Uri +import android.os.Build import android.os.Bundle import android.view.Menu import android.view.MenuItem @@ -66,7 +67,7 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete } override fun onCropImageComplete(view: CropImageView?, result: CropImageView.CropResult) { - if (isDestroyed) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && isDestroyed) return if (result.error == null) {