mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Remove write permission in share intent
This commit is contained in:
parent
d5de52a789
commit
88cda20582
1 changed files with 0 additions and 2 deletions
|
@ -71,7 +71,6 @@ class ShareChannelHandler(activity: Activity) :
|
||||||
ClipData.newUri(_context.contentResolver, "Share", uris[0])
|
ClipData.newUri(_context.contentResolver, "Share", uris[0])
|
||||||
type = mimeTypes[0] ?: "*/*"
|
type = mimeTypes[0] ?: "*/*"
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||||
addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
|
|
||||||
} else Intent().apply {
|
} else Intent().apply {
|
||||||
action = Intent.ACTION_SEND_MULTIPLE
|
action = Intent.ACTION_SEND_MULTIPLE
|
||||||
putParcelableArrayListExtra(Intent.EXTRA_STREAM, ArrayList(uris))
|
putParcelableArrayListExtra(Intent.EXTRA_STREAM, ArrayList(uris))
|
||||||
|
@ -86,7 +85,6 @@ class ShareChannelHandler(activity: Activity) :
|
||||||
it?.startsWith("image/") == true
|
it?.startsWith("image/") == true
|
||||||
}) "image/*" else "*/*"
|
}) "image/*" else "*/*"
|
||||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||||
addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
|
|
||||||
}
|
}
|
||||||
val shareChooser = Intent.createChooser(
|
val shareChooser = Intent.createChooser(
|
||||||
shareIntent, _context.getString(
|
shareIntent, _context.getString(
|
||||||
|
|
Loading…
Reference in a new issue