mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Change requestPermissions
This commit is contained in:
parent
93e8b777bb
commit
9659389057
1 changed files with 3 additions and 1 deletions
|
|
@ -92,7 +92,8 @@ public class ShareActivity
|
|||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
//Check for Storage permission that is required for upload. Do not allow user to proceed without permission, otherwise will crash
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 4);
|
||||
//See http://stackoverflow.com/questions/33169455/onrequestpermissionsresult-not-being-called-in-dialog-fragment
|
||||
requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 4);
|
||||
} else {
|
||||
uploadBegins();
|
||||
}
|
||||
|
|
@ -295,6 +296,7 @@ public class ShareActivity
|
|||
getFileMetadata();
|
||||
getLocationData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue