mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-02-25 16:07:54 +01:00
do not require the Storage Permission at handling third party intents
This commit is contained in:
parent
63b28403bc
commit
2f23c18e94
@ -204,17 +204,13 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
||||
|
||||
private fun checkIntents() {
|
||||
if (intent?.action == Intent.ACTION_SEND && intent.type?.startsWith("image/") == true) {
|
||||
getStoragePermission {
|
||||
val uri = intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM)
|
||||
tryOpenUri(uri, intent)
|
||||
}
|
||||
val uri = intent.getParcelableExtra<Uri>(Intent.EXTRA_STREAM)
|
||||
tryOpenUri(uri, intent)
|
||||
}
|
||||
|
||||
if (intent?.action == Intent.ACTION_SEND_MULTIPLE && intent.type?.startsWith("image/") == true) {
|
||||
getStoragePermission {
|
||||
val imageUris = intent.getParcelableArrayListExtra<Uri>(Intent.EXTRA_STREAM)
|
||||
imageUris.any { tryOpenUri(it, intent) }
|
||||
}
|
||||
val imageUris = intent.getParcelableArrayListExtra<Uri>(Intent.EXTRA_STREAM)
|
||||
imageUris.any { tryOpenUri(it, intent) }
|
||||
}
|
||||
|
||||
if (intent?.action == Intent.ACTION_VIEW && intent.data != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user