Skip to content

Conversation

@alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Dec 23, 2024

  • Tests written, or not not needed

  • Simplify the StoragePermissionDialog logic by removing the external listener. The dialog’s sole responsibility should be to either open the app settings to request “Manage All Files” permission or request read-only media access. Decoupling this functionality from external listeners improves code readability and reduces complexity

  • Use precise and descriptive function names to improve code clarity and maintainability

  • Remove redundant checks in the requestStoragePermissionIfNeeded() function. This function already internally verifies whether storage permission is required, making additional checks unnecessary

  • Remove the readOnly parameter as its logic is implicitly tied to Android 11 and above (API level 30+). The current implementation redundantly checks the same condition (readOnly && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) multiple times, which is unnecessary and can lead to confusion

  • Add READ_MEDIA_VISUAL_USER_SELECTED permission (Documentation)

Android 7 GPlayImage 1 Android 11 GenericImage 2 Android 11 GPlayImage 3 Android 15 GenericImage 4 Android 15 GPlayImage 5

@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch 2 times, most recently from 8cf4d1d to b5e9287 Compare January 14, 2025 12:15
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch from bbfe854 to bf0c209 Compare January 21, 2025 08:30
@alperozturk96 alperozturk96 added this to the Nextcloud App 3.31.0 milestone Jan 21, 2025
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch 2 times, most recently from 879b0fd to 9ed1092 Compare January 22, 2025 11:10
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch from 9ed1092 to e6656ee Compare February 10, 2025 08:35
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch 3 times, most recently from 4c54653 to 7e9ff37 Compare February 11, 2025 08:08
@tobiasKaminsky tobiasKaminsky removed this from the Nextcloud App 3.31.0 milestone Feb 11, 2025
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch from 7e9ff37 to cab2ba1 Compare February 12, 2025 08:11
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch 2 times, most recently from a276a90 to c2481fe Compare February 25, 2025 10:40
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch 3 times, most recently from 369071d to 2ace0dd Compare March 4, 2025 14:19
ZetaTom

This comment was marked as resolved.

@alperozturk96 alperozturk96 marked this pull request as draft March 6, 2025 15:31
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch from 2ace0dd to 4a6b9e2 Compare March 20, 2025 08:31
@alperozturk96 alperozturk96 marked this pull request as ready for review March 20, 2025 09:13
@nextcloud nextcloud deleted a comment from github-actions bot Mar 20, 2025
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch 2 times, most recently from 2c4e997 to 1ef3010 Compare May 5, 2025 14:06
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch from 67442a2 to 935e2a5 Compare May 26, 2025 04:16
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch from 8af88dd to 4c28ed2 Compare June 4, 2025 10:52
ZetaTom

This comment was marked as resolved.

Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
@alperozturk96 alperozturk96 force-pushed the improve-storage-permission-handling branch from 4c28ed2 to 8ed5301 Compare June 6, 2025 09:54
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14229.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@alperozturk96
Copy link
Collaborator Author

replaced with #15977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review hotspot: device storage Storage (on-device) related. Permissions, paths, inconsistencies, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants