mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Merge d51ddb989d into 63f621cb56
This commit is contained in:
commit
1b8c9a565c
1 changed files with 10 additions and 0 deletions
|
|
@ -314,6 +314,16 @@ class UploadActivity : BaseActivity(), UploadContract.View, UploadBaseFragment.C
|
|||
// Check if all required permissions are granted
|
||||
val hasAllPermissions = hasPermission(this, PERMISSIONS_STORAGE)
|
||||
val hasPartialAccess = hasPartialAccess(this)
|
||||
|
||||
// The share intent provides files via content uris with temporary read permissions,
|
||||
// so we do not need to obtain storage permissions
|
||||
val intent = intent
|
||||
val action = intent.action
|
||||
if (Intent.ACTION_SEND == action || Intent.ACTION_SEND_MULTIPLE == action) {
|
||||
receiveSharedItems()
|
||||
return
|
||||
}
|
||||
|
||||
if (hasAllPermissions || hasPartialAccess) {
|
||||
// All required permissions are granted, so enable UI elements and perform actions
|
||||
receiveSharedItems()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue