Added an flag to the gallery intent to prevent two instances of it (#582)

This commit is contained in:
Sergei Butko 2018-01-22 11:17:14 +02:00 committed by Ivan Pusic
parent 6bbfc643ed
commit 56d1c69fc8

View File

@ -326,7 +326,8 @@ class PickerModule extends ReactContextBaseJavaModule implements ActivityEventLi
String[] mimetypes = {"image/*", "video/*"};
galleryIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
}
galleryIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
galleryIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, multiple);
galleryIntent.setAction(Intent.ACTION_GET_CONTENT);
galleryIntent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);