The DocumentStorageProvider throws a SecurityException while opening thumbnails from apps other than the android own files app:
java.lang.SecurityException: Permission Denial: reading com.owncloud.android.providers.DiskLruImageCacheFileProvider uri content://org.nextcloud.imageCache.provider/Test/Nextcloud.png from pid=32321, uid=10138 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
Steps to reproduce:
- Use Material Files app v1.1.2 and add one of our nextcloud folders as external storage.
- Browse the folder within the app.
- For images the SecurityException exception is raised and no thumbnails are shown.
The problem here is that our DiskLruImageCacheFileProvider is called with the pid of the calling app.
One solution is to use the ThumbnailsCacheManager directly (as we did for thumbnail generation request) and copy the lines of DiskLruImageCacheFileProvider.
The DocumentStorageProvider throws a SecurityException while opening thumbnails from apps other than the android own files app:
java.lang.SecurityException: Permission Denial: reading com.owncloud.android.providers.DiskLruImageCacheFileProvider uri content://org.nextcloud.imageCache.provider/Test/Nextcloud.png from pid=32321, uid=10138 requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIsSteps to reproduce:
The problem here is that our DiskLruImageCacheFileProvider is called with the pid of the calling app.
One solution is to use the ThumbnailsCacheManager directly (as we did for thumbnail generation request) and copy the lines of DiskLruImageCacheFileProvider.