Open velitasali opened 5 years ago
The same happens with Files app. If we open Files app, select a file and then via share button share ti through TrebleShot. It gives error.
04-14 14:31:53.666 32617 1754 W System.err: java.lang.SecurityException: Permission Denial: opening provider com.android.externalstorage.ExternalStorageProvider from ProcessRecord{494e96b 32617:com.genonbeta.TrebleShot:transfer/u0a151} (pid=32617, uid=10151) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs 04-14 14:31:53.675
Android version: Android 10 ROM: Extendid UI Language: EN/US App version 1.4.2 Device Model and Brand: Nexus 6p
@mubashir-rehman edited your comment to only include the necessary part. Thanks for the report.
New findings:
This error occurs because intent validity is bound to the activity that receives it (SharingActivity in this case). As soon as the receiver activity finishes, the permission to open the URIs is revoked unless one of the URIs is still open. In order words, leaving the activity and without starting the transfer will result in this error (which will not be recoverable).
Describe the bug When the content from Downloads in Google Chrome or any photo from Google Photos and similar apps is shared, the process fails with the below error
To Reproduce Select and share any item as described above. The error can easily be seen when the file information is shown in the transfer activity
Expected behavior Share the files
Environment (please complete the following information):