close the app if the user goes Back from picking an image without pick
This commit is contained in:
parent
b34fbabbf8
commit
e20a9294df
1 changed files with 6 additions and 2 deletions
|
@ -88,8 +88,12 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete
|
|||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (requestCode == PICK_IMAGE && resultCode == Activity.RESULT_OK && data != null) {
|
||||
handleImage(data)
|
||||
if (requestCode == PICK_IMAGE) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
handleImage(data)
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue