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