Skip to content

Commit

Permalink
Fix: after pressing "back" return to caller off this app and not to p…
Browse files Browse the repository at this point in the history
…revious-instance without parameters
  • Loading branch information
k3b committed May 7, 2019
1 parent f28bde7 commit 4f79153
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ private void pickFromGallery() {
Log.d(TAG, "Opening Image Picker");
Intent intent = new Intent(Intent.ACTION_GET_CONTENT)
.setType(IMAGE_JPEG_MIME)
.addCategory(Intent.CATEGORY_OPENABLE);
.addCategory(Intent.CATEGORY_OPENABLE)
// Fix: after pressing "back" return to caller off this app and not to previous-instance
// without parameters
.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
;

startActivityForResult(Intent.createChooser(intent, getString(R.string.label_select_picture)), REQUEST_GET_PICTURE);
}
Expand Down

0 comments on commit 4f79153

Please sign in to comment.