add a device version check at SetWallpaper activity

This commit is contained in:
tibbi 2017-03-22 22:33:54 +01:00
parent 250771f21b
commit 7ebfeeb66a
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import android.app.WallpaperManager
import android.content.Intent import android.content.Intent
import android.graphics.Bitmap import android.graphics.Bitmap
import android.net.Uri import android.net.Uri
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.view.Menu import android.view.Menu
import android.view.MenuItem import android.view.MenuItem
@ -66,7 +67,7 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete
} }
override fun onCropImageComplete(view: CropImageView?, result: CropImageView.CropResult) { override fun onCropImageComplete(view: CropImageView?, result: CropImageView.CropResult) {
if (isDestroyed) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && isDestroyed)
return return
if (result.error == null) { if (result.error == null) {