FlowCrypt / flowcrypt-android

FlowCrypt Android App
https://flowcrypt.com
Other
93 stars 11 forks source link

android:grantUriPermissions in EmbeddedAttachmentsProvider #2824

Closed DenBond7 closed 3 months ago

DenBond7 commented 3 months ago

EmbeddedAttachmentsProvider extends DocumentsProvider. Based on the guide the extended class should have android:grantUriPermissions="true" in AndroidManifest.xml. So it can't be removed.

as described in #2606 EmbeddedAttachmentsProvider is simple and implements only a few methods. In addition, I've disabled modification explicitly(just in case). Also, modification is not allowed by

  1. granted uri permission(we allow only the read mode)

https://github.com/FlowCrypt/flowcrypt-android/blob/795034ef4bb6037d999023e34eb8792d6019d617/FlowCrypt/src/main/java/com/flowcrypt/email/util/GeneralUtil.kt#L481

  1. android.permission.MANAGE_DOCUMENTS

image

  1. the source is stored in val. The last one is immutable.