From 8bec89d92804c6adf1bdcf4c3eb9fd7d246625f0 Mon Sep 17 00:00:00 2001 From: David Allison <62114487+david-allison@users.noreply.github.com> Date: Mon, 22 Jun 2026 00:50:32 +0100 Subject: [PATCH 1/2] chore: remove `annotations` folder TextUtils.isEmpty is now unused and the folder has not been extended in 6 years --- annotations/README.md | 49 ------------------------ annotations/android/text/annotations.xml | 24 ------------ 2 files changed, 73 deletions(-) delete mode 100644 annotations/README.md delete mode 100644 annotations/android/text/annotations.xml diff --git a/annotations/README.md b/annotations/README.md deleted file mode 100644 index a825c5b604d0..000000000000 --- a/annotations/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# External Annotations for Android Standard Library - -## Rationale - -`@Contract` annotations for Android methods allow the removal of tautological lint checks. - -For example: if `TextUtils.isEmpty(str)` returns `false`, then `str` is non-null. `@Contract` allows us to specify this invariant to the linter, which reduces lint warnings and/or unnecessary code. - -**@Contract annotations should be inline whenever possible**. This folder exists so we can define our own contract annotations on our dependencies. - -## Syntax - -See: https://www.jetbrains.com/help/idea/contract-annotations.html - -## Installation Instructions - -* Open an Android Source file in Android Studio -* Move the Cursor over a method and bring up the Quick Fixes Menu (Alt + Enter) -* Select "Add Method Contract to `[method]`" -* Enter a dummy annotation: `null -> null` -* Select the folder containing this file as the annotations root - -Annotations should now appear - -## Modification Instructions - -* In Android Studio Settings: `jdk.table.xml` -* You can find the element under one of the `` elements as a `file://` URL: -* Removing this line will allow the selection of another annotation root. - -Sample: -```xml - - - - - - - - - - -``` - -## Future Goals - -It would be ideal if these could be set on a per-project basis. I haven't had the time to determine whether this is possible. - -These annotations are not yet supported by our automated tooling. diff --git a/annotations/android/text/annotations.xml b/annotations/android/text/annotations.xml deleted file mode 100644 index 02f118b772a8..000000000000 --- a/annotations/android/text/annotations.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - \ No newline at end of file From 2bbeb8d0e881ae736a36848ecdc07f490b8ba4fa Mon Sep 17 00:00:00 2001 From: David Allison <62114487+david-allison@users.noreply.github.com> Date: Mon, 22 Jun 2026 00:51:18 +0100 Subject: [PATCH 2/2] chore(docs): remove `scoped storage` folder The migration has been completed and removed --- docs/scoped_storage/README.md | 1 - docs/scoped_storage/consent.md | 22 ---------------------- 2 files changed, 23 deletions(-) delete mode 100644 docs/scoped_storage/README.md delete mode 100644 docs/scoped_storage/consent.md diff --git a/docs/scoped_storage/README.md b/docs/scoped_storage/README.md deleted file mode 100644 index b48eae4e53a0..000000000000 --- a/docs/scoped_storage/README.md +++ /dev/null @@ -1 +0,0 @@ -See: https://developer.android.com/about/versions/11/privacy/storage \ No newline at end of file diff --git a/docs/scoped_storage/consent.md b/docs/scoped_storage/consent.md deleted file mode 100644 index 4efffcc1f051..000000000000 --- a/docs/scoped_storage/consent.md +++ /dev/null @@ -1,22 +0,0 @@ -We should inform the users: - -* The driving force is privacy -* Uninstalling before migration will disable `preserveLegacyExternalStorage` and they will need to perform a manual migration - * Just tell them not to uninstall -* Syncing will temporarily be disabled -* Uninstalling during the process may cause data loss -* Uninstalling after the process will delete all data instead of just settings -* How long this will take - -We should obtain explicit consent: - -* Since we are moving files, this puts data itegrity at (low) risk -* To reduce issues from users uninstalling - -We may inform users: - -* Syncing and importing will be much faster -* The new location of storage -* USB access only - -We do this via a link to https://github.com/ankidroid/Anki-Android/wiki/Storage-Migration-FAQ \ No newline at end of file