feat: Make all file access permission optional on full builds#21046
feat: Make all file access permission optional on full builds#21046Fandroid745 wants to merge 1 commit into
Conversation
BrayanDSO
left a comment
There was a problem hiding this comment.
Instead of a skip button, simply don't disable the Continue button if the permission hasn't been allowed. If they tap the button, the dialog should be shown
| <string name="btn_skip_permission">Skip</string> | ||
| <string name="private_storage_warning_title"> Limited Storage access</string> | ||
| <string name="private_storage_warning">Without this permission, Your Ankidroid collection will be stored in app\'s private storage and will be permanently deleted if you uninstall Ankidroid.</string> |
There was a problem hiding this comment.
this file isn't translated, so those strings shouldn't be here
|
The title shouldn't include "needs"
|
david-allison
left a comment
There was a problem hiding this comment.
This is one of our really badly wanted fixes, thank you!!!!!!!!!!!!!
Initially this looks good to me. This will want a lower priority follow up issue to fix the AnkiDroid directory preference. Please don't fix it in this PR, as that dialog is being rewritten
- change the button text to "skip", don't add another button
- Fix the title, see my other comment
- Use "app private", not "private"
| <string name="use_private_storage_key">usePrivatestorage</string> | ||
| <string name="btn_skip_permission">Skip</string> | ||
| <string name="private_storage_warning_title"> Limited Storage access</string> | ||
| <string name="private_storage_warning">Without this permission, Your Ankidroid collection will be stored in app\'s private storage and will be permanently deleted if you uninstall Ankidroid.</string> |
There was a problem hiding this comment.
AnkiDroid
I don't like this warning, the UI should be a selection, rather than showing a user a scary dialog during the onboarding process
I'd block this if it weren't F-Droid only - users there are more understanding of privacy
Add an issue and a TODO to rethink the UI
There was a problem hiding this comment.
AnkiDroidI don't like this warning, the UI should be a selection, rather than showing a user a scary dialog during the onboarding process
I'd block this if it weren't F-Droid only - users there are more understanding of privacy
Add an issue and a TODO to rethink the UI
Will do!
I had created that dialog as it was one of the comments on the issue
|
|
||
| val externalFilesDir = | ||
| requireContext().getExternalFilesDir(null) ?: requireContext().filesDir | ||
| val privateDir = File(externalFilesDir, "AnkiDroid").apply { mkdirs() } |
There was a problem hiding this comment.
Nit: mkdirs() return value isn't checked. If it fails (disk full/corrupted), the pref gets set to a non existent path.
42bcc35 to
83f9a8b
Compare
|
Important Maintainers: This PR contains Strings changes
|
83f9a8b to
51b427b
Compare
51b427b to
b73806c
Compare
|
I have addressed the review comments now, |
Purpose / Description
AnkiDroid forces the users to grant the "All files access" permission on full builds(fdroid/github) with no way to opt out. The users who sync via AnkiWeb or manage their have no need to grant this permission.
Fixes
full(F-Droid/GitHub) releases users to grant theAll files accesspermission #13574Approach
/storage/emulated/0/Android/data/com.ichi2.anki.debug/files/AnkiDroid and deleted on uninstall.
How Has This Been Tested?
Tested on Android 15 device (with the build variants fullDebug and fullRelease)
Screenshots
Skip button to skip all files permission
Dialog explaning the trade-offs

The app private storage being used

Checklist