Modify case statement

This commit is contained in:
misaochan 2016-08-09 16:56:27 +12:00
parent e9038db41b
commit 72863dd88a

View file

@ -164,13 +164,12 @@ public class ContributionsListFragment extends Fragment {
switch (requestCode) { switch (requestCode) {
// 1 = Storage allowed when gallery selected // 1 = Storage allowed when gallery selected
case 1: { case 1: {
if (grantResults.length > 0 if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
controller.startGalleryPick(); controller.startGalleryPick();
} else { } else {
return; return;
} }
return; break;
} }
} }
} }