mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
56a195bf46
MANAGE_EXTERNAL_STORAGE is for non-Google Play builds. Google won't let us have the permission, but there's no reason other stores + users have to suffer this decision. This allows a Google Play user to restore their data if they uninstall (uninstall, then download the APK and data is available again) * Remove MANAGE_EXTERNAL_STORAGE from the manifest if targeting `play` Version Codes & Outcomes: 1 < Q - force storage permissions as done previously (incl. Play Store) 2 Q - Users are unsafe and need a storage migration * MANAGE_EXTERNAL_STORAGE is unavailable * READ/WRITE_EXTERNAL_STORAGE is unavailable 3 > Q - Non-Play-Store users need MANAGE_EXTERNAL_STORAGE (*) 4 > Q - Play Store users are unsafe and need a storage migration If a user is starting out and may request 'safe' permissions (1) (3) Then we keep `deckPath` as a legacy path. 1) & 3) We do not allow access to the app until they give permission ---- Storage can be re-enabled after this change via: ``` adb shell am compat disable DEFAULT_SCOPED_STORAGE com.ichi2.anki.debug adb shell am compat disable FORCE_ENABLE_SCOPED_STORAGE com.ichi2.anki.debug adb shell pm grant com.ichi2.anki.debug android.permission.READ_EXTERNAL_STORAGE adb shell pm grant com.ichi2.anki.debug android.permission.WRITE_EXTERNAL_STORAGE ``` on an API 30 emulator (or a non-AOSP emulator) Related: Issue 5304 Fixes 13051 - targetSdkVersion 30 fixes this |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
build.gradle | ||
COPYING.LESSER |