diff --git a/app-k9mail/fastlane/Appfile b/app-k9mail/fastlane/Appfile deleted file mode 100644 index 0a9615155..000000000 --- a/app-k9mail/fastlane/Appfile +++ /dev/null @@ -1,3 +0,0 @@ -# Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one -json_key_file(ENV["K9_JSON_KEY_FILE"]) -package_name("com.fsck.k9") diff --git a/app-k9mail/fastlane/Fastfile b/app-k9mail/fastlane/Fastfile deleted file mode 100644 index 19790a663..000000000 --- a/app-k9mail/fastlane/Fastfile +++ /dev/null @@ -1,47 +0,0 @@ -# This file contains the fastlane.tools configuration -# You can find the documentation at https://docs.fastlane.tools -# -# For a list of all available actions, check out -# -# https://docs.fastlane.tools/actions -# -# For a list of all available plugins, check out -# -# https://docs.fastlane.tools/plugins/available-plugins -# - -opt_out_usage - -default_platform(:android) - -platform :android do - desc "Runs all the tests" - lane :test do - gradle(task: "test", gradle_path: "../gradlew") - end - - desc "Deploy a new version to the Google Play beta track" - lane :deploy do - gradle( - task: "clean :app-k9mail:assembleRelease", - build_type: "Release", - flavor: "google", - gradle_path: `../gradlew`, - print_command: false, - flags: "--no-build-cache --no-configuration-cache", - properties: { - "android.injected.signing.store.file" => ENV["K9MAIL_KEYSTORE_PATH"], - "android.injected.signing.store.password" => ENV["K9MAIL_KEYSTORE_PASS"], - "android.injected.signing.key.alias" => ENV["K9MAIL_KEYSTORE_WALLET_ALIAS"], - "android.injected.signing.key.password" => ENV["K9MAIL_KEYSTORE_WALLET_PASS"], - } - ) - upload_to_play_store( - track: "beta", - skip_upload_images: true, - skip_upload_screenshots: true, - skip_upload_apk: false, - validate_only: true, - ) - end -end diff --git a/app-k9mail/fastlane/README.md b/app-k9mail/fastlane/README.md deleted file mode 100644 index 071818bb7..000000000 --- a/app-k9mail/fastlane/README.md +++ /dev/null @@ -1,40 +0,0 @@ -fastlane documentation ----- - -# Installation - -Make sure you have the latest version of the Xcode command line tools installed: - -```sh -xcode-select --install -``` - -For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) - -# Available Actions - -## Android - -### android test - -```sh -[bundle exec] fastlane android test -``` - -Runs all the tests - -### android deploy - -```sh -[bundle exec] fastlane android deploy -``` - -Deploy a new version to the Google Play beta track - ----- - -This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. - -More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). - -The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/app-k9mail/fastlane/metadata/android/ar/short_description.txt b/app-metadata/com.fsck.k9/ar/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/ar/short_description.txt rename to app-metadata/com.fsck.k9/ar/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/de/short_description.txt b/app-metadata/com.fsck.k9/de/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/de/short_description.txt rename to app-metadata/com.fsck.k9/de/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29004.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29004.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29004.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29004.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29005.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29005.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29005.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29005.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29006.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29006.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29006.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29006.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29007.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29007.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29007.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29007.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29008.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29008.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29008.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29008.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29009.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29009.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29009.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29009.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29010.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29010.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29010.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29010.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29011.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29011.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29011.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29011.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29012.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29012.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29012.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29012.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29013.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29013.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29013.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29013.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29014.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29014.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29014.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29014.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29015.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29015.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29015.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29015.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/29016.txt b/app-metadata/com.fsck.k9/en-US/changelogs/29016.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/29016.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/29016.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/30000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/30000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/30000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/30000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/31000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/31000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/31000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/31000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/31001.txt b/app-metadata/com.fsck.k9/en-US/changelogs/31001.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/31001.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/31001.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/32000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/32000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/32000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/32000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/32001.txt b/app-metadata/com.fsck.k9/en-US/changelogs/32001.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/32001.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/32001.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/32002.txt b/app-metadata/com.fsck.k9/en-US/changelogs/32002.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/32002.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/32002.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33001.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33001.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33001.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33001.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33002.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33002.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33002.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33002.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33003.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33003.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33003.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33003.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33004.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33004.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33004.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33004.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33005.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33005.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33005.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33005.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33006.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33006.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33006.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33006.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33007.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33007.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33007.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33007.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33008.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33008.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33008.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33008.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33009.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33009.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33009.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33009.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33010.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33010.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33010.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33010.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33011.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33011.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33011.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33011.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/33012.txt b/app-metadata/com.fsck.k9/en-US/changelogs/33012.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/33012.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/33012.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/34000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/34000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/34000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/34000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35001.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35001.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35001.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35001.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35002.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35002.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35002.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35002.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35003.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35003.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35003.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35003.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35004.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35004.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35004.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35004.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35005.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35005.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35005.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35005.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35006.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35006.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35006.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35006.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35007.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35007.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35007.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35007.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35008.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35008.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35008.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35008.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35009.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35009.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35009.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35009.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35010.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35010.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35010.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35010.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/35011.txt b/app-metadata/com.fsck.k9/en-US/changelogs/35011.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/35011.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/35011.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/36000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/36000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/36000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/36000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/36001.txt b/app-metadata/com.fsck.k9/en-US/changelogs/36001.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/36001.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/36001.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/36002.txt b/app-metadata/com.fsck.k9/en-US/changelogs/36002.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/36002.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/36002.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/36003.txt b/app-metadata/com.fsck.k9/en-US/changelogs/36003.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/36003.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/36003.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37001.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37001.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37001.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37001.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37002.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37002.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37002.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37002.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37003.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37003.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37003.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37003.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37004.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37004.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37004.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37004.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37005.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37005.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37005.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37005.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37006.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37006.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37006.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37006.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37007.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37007.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37007.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37007.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37008.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37008.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37008.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37008.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37009.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37009.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37009.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37009.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37010.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37010.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37010.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37010.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37011.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37011.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37011.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37011.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37012.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37012.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37012.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37012.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37013.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37013.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37013.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37013.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37014.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37014.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37014.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37014.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37015.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37015.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37015.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37015.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37016.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37016.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37016.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37016.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/37017.txt b/app-metadata/com.fsck.k9/en-US/changelogs/37017.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/37017.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/37017.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/38000.txt b/app-metadata/com.fsck.k9/en-US/changelogs/38000.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/38000.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/38000.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/changelogs/38001.txt b/app-metadata/com.fsck.k9/en-US/changelogs/38001.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/changelogs/38001.txt rename to app-metadata/com.fsck.k9/en-US/changelogs/38001.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/full_description.txt b/app-metadata/com.fsck.k9/en-US/full_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/full_description.txt rename to app-metadata/com.fsck.k9/en-US/full_description.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/icon.png b/app-metadata/com.fsck.k9/en-US/images/icon.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/icon.png rename to app-metadata/com.fsck.k9/en-US/images/icon.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png b/app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/1.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png rename to app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/1.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png b/app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/2.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png rename to app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/2.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png b/app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/3.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png rename to app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/3.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png b/app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/4.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png rename to app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/4.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png b/app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/5.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png rename to app-metadata/com.fsck.k9/en-US/images/phoneScreenshots/5.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/sevenInchScreenshots/1.png b/app-metadata/com.fsck.k9/en-US/images/sevenInchScreenshots/1.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/sevenInchScreenshots/1.png rename to app-metadata/com.fsck.k9/en-US/images/sevenInchScreenshots/1.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/images/tenInchScreenshots/1.png b/app-metadata/com.fsck.k9/en-US/images/tenInchScreenshots/1.png similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/images/tenInchScreenshots/1.png rename to app-metadata/com.fsck.k9/en-US/images/tenInchScreenshots/1.png diff --git a/app-k9mail/fastlane/metadata/android/en-US/short_description.txt b/app-metadata/com.fsck.k9/en-US/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/short_description.txt rename to app-metadata/com.fsck.k9/en-US/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/en-US/title.txt b/app-metadata/com.fsck.k9/en-US/title.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/en-US/title.txt rename to app-metadata/com.fsck.k9/en-US/title.txt diff --git a/app-k9mail/fastlane/metadata/android/eo/short_description.txt b/app-metadata/com.fsck.k9/eo/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/eo/short_description.txt rename to app-metadata/com.fsck.k9/eo/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/es/short_description.txt b/app-metadata/com.fsck.k9/es/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/es/short_description.txt rename to app-metadata/com.fsck.k9/es/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/fr/short_description.txt b/app-metadata/com.fsck.k9/fr/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/fr/short_description.txt rename to app-metadata/com.fsck.k9/fr/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/he/short_description.txt b/app-metadata/com.fsck.k9/he/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/he/short_description.txt rename to app-metadata/com.fsck.k9/he/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/it/short_description.txt b/app-metadata/com.fsck.k9/it/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/it/short_description.txt rename to app-metadata/com.fsck.k9/it/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/ja/short_description.txt b/app-metadata/com.fsck.k9/ja/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/ja/short_description.txt rename to app-metadata/com.fsck.k9/ja/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/nb/short_description.txt b/app-metadata/com.fsck.k9/nb/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/nb/short_description.txt rename to app-metadata/com.fsck.k9/nb/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/pl/short_description.txt b/app-metadata/com.fsck.k9/pl/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/pl/short_description.txt rename to app-metadata/com.fsck.k9/pl/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/pt-BR/short_description.txt b/app-metadata/com.fsck.k9/pt-BR/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/pt-BR/short_description.txt rename to app-metadata/com.fsck.k9/pt-BR/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/pt-PT/short_description.txt b/app-metadata/com.fsck.k9/pt-PT/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/pt-PT/short_description.txt rename to app-metadata/com.fsck.k9/pt-PT/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/pt/short_description.txt b/app-metadata/com.fsck.k9/pt/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/pt/short_description.txt rename to app-metadata/com.fsck.k9/pt/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/ro/short_description.txt b/app-metadata/com.fsck.k9/ro/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/ro/short_description.txt rename to app-metadata/com.fsck.k9/ro/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/ru/short_description.txt b/app-metadata/com.fsck.k9/ru/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/ru/short_description.txt rename to app-metadata/com.fsck.k9/ru/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/sq/short_description.txt b/app-metadata/com.fsck.k9/sq/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/sq/short_description.txt rename to app-metadata/com.fsck.k9/sq/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/tr/short_description.txt b/app-metadata/com.fsck.k9/tr/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/tr/short_description.txt rename to app-metadata/com.fsck.k9/tr/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/uk/short_description.txt b/app-metadata/com.fsck.k9/uk/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/uk/short_description.txt rename to app-metadata/com.fsck.k9/uk/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/zh-CN/short_description.txt b/app-metadata/com.fsck.k9/zh-CN/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/zh-CN/short_description.txt rename to app-metadata/com.fsck.k9/zh-CN/short_description.txt diff --git a/app-k9mail/fastlane/metadata/android/zh-TW/short_description.txt b/app-metadata/com.fsck.k9/zh-TW/short_description.txt similarity index 100% rename from app-k9mail/fastlane/metadata/android/zh-TW/short_description.txt rename to app-metadata/com.fsck.k9/zh-TW/short_description.txt diff --git a/app/common/src/main/java/com/fsck/k9/backends/AndroidAlarmManager.kt b/app/common/src/main/java/com/fsck/k9/backends/AndroidAlarmManager.kt index 9e8696aa9..6e27a04c9 100644 --- a/app/common/src/main/java/com/fsck/k9/backends/AndroidAlarmManager.kt +++ b/app/common/src/main/java/com/fsck/k9/backends/AndroidAlarmManager.kt @@ -60,10 +60,6 @@ class AndroidAlarmManager( ) } - override fun canScheduleExactAlarms(): Boolean { - return alarmManager.canScheduleExactAlarms() - } - override fun setAlarm(triggerTime: Long, callback: Callback) { this.callback.set(callback) alarmManager.scheduleAlarm(triggerTime, pendingIntent) diff --git a/app/common/src/main/java/com/fsck/k9/backends/ImapBackendFactory.kt b/app/common/src/main/java/com/fsck/k9/backends/ImapBackendFactory.kt index 62202b3bf..123ca4d22 100644 --- a/app/common/src/main/java/com/fsck/k9/backends/ImapBackendFactory.kt +++ b/app/common/src/main/java/com/fsck/k9/backends/ImapBackendFactory.kt @@ -2,6 +2,7 @@ package com.fsck.k9.backends import android.content.Context import com.fsck.k9.Account +import com.fsck.k9.Account.Expunge import com.fsck.k9.backend.BackendFactory import com.fsck.k9.backend.api.Backend import com.fsck.k9.backend.imap.ImapBackend @@ -74,6 +75,8 @@ class ImapBackendFactory( override fun isSubscribedFoldersOnly() = account.isSubscribedFoldersOnly + override fun isExpungeImmediately() = account.expungePolicy == Expunge.EXPUNGE_IMMEDIATELY + override fun clientId() = ImapClientId(appName = clientIdAppName, appVersion = clientIdAppVersion) } } diff --git a/app/common/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt b/app/common/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt index d2ec95094..33e7bb838 100644 --- a/app/common/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt +++ b/app/common/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt @@ -44,9 +44,13 @@ class K9CoreResourceProvider(private val context: Context) : CoreResourceProvide PushNotificationState.LISTENING -> R.string.push_notification_state_listening PushNotificationState.WAIT_BACKGROUND_SYNC -> R.string.push_notification_state_wait_background_sync PushNotificationState.WAIT_NETWORK -> R.string.push_notification_state_wait_network + PushNotificationState.ALARM_PERMISSION_MISSING -> R.string.push_notification_state_alarm_permission_missing } return context.getString(resId) } override fun pushNotificationInfoText(): String = context.getString(R.string.push_notification_info) + + override fun pushNotificationGrantAlarmPermissionText(): String = + context.getString(R.string.push_notification_grant_alarm_permission) } diff --git a/app/core/src/main/java/com/fsck/k9/CoreResourceProvider.kt b/app/core/src/main/java/com/fsck/k9/CoreResourceProvider.kt index 1c8a9b13e..c135a88b5 100644 --- a/app/core/src/main/java/com/fsck/k9/CoreResourceProvider.kt +++ b/app/core/src/main/java/com/fsck/k9/CoreResourceProvider.kt @@ -32,4 +32,5 @@ interface CoreResourceProvider { val iconPushNotification: Int fun pushNotificationText(notificationState: PushNotificationState): String fun pushNotificationInfoText(): String + fun pushNotificationGrantAlarmPermissionText(): String } diff --git a/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManager.kt b/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManager.kt new file mode 100644 index 000000000..b0bfb4ecc --- /dev/null +++ b/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManager.kt @@ -0,0 +1,50 @@ +package com.fsck.k9.controller.push + +import android.content.Context +import android.os.Build +import android.provider.Settings +import com.fsck.k9.helper.AlarmManagerCompat + +/** + * Checks whether the app can schedule exact alarms. + */ +internal interface AlarmPermissionManager { + /** + * Checks whether the app can schedule exact alarms. + * + * If this method returns `false`, the app has to request the permission to schedule exact alarms. See + * [Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM]. + */ + fun canScheduleExactAlarms(): Boolean + + /** + * Register a listener to be notified when the app was granted the permission to schedule exact alarms. + */ + fun registerListener(listener: AlarmPermissionListener) + + /** + * Unregister the listener registered via [registerListener]. + */ + fun unregisterListener() +} + +/** + * Factory method to create an Android API-specific instance of [AlarmPermissionManager]. + */ +internal fun AlarmPermissionManager(context: Context, alarmManagerCompat: AlarmManagerCompat): AlarmPermissionManager { + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + AlarmPermissionManagerApi31(context, alarmManagerCompat) + } else { + AlarmPermissionManagerApi21() + } +} + +/** + * Listener that can be notified when the app was granted the permission to schedule exact alarms. + * + * Note: Currently Android stops (and potentially restarts) the app when the permission is revoked. So there's no + * callback mechanism for the permission revocation case. + */ +internal fun interface AlarmPermissionListener { + fun onAlarmPermissionGranted() +} diff --git a/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManagerApi21.kt b/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManagerApi21.kt new file mode 100644 index 000000000..cbd1fbf5c --- /dev/null +++ b/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManagerApi21.kt @@ -0,0 +1,14 @@ +package com.fsck.k9.controller.push + +/** + * On Android versions prior to 12 there's no permission to limit an app's ability to schedule exact alarms. + */ +internal class AlarmPermissionManagerApi21 : AlarmPermissionManager { + override fun canScheduleExactAlarms(): Boolean { + return true + } + + override fun registerListener(listener: AlarmPermissionListener) = Unit + + override fun unregisterListener() = Unit +} diff --git a/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManagerApi31.kt b/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManagerApi31.kt new file mode 100644 index 000000000..b6e91b4af --- /dev/null +++ b/app/core/src/main/java/com/fsck/k9/controller/push/AlarmPermissionManagerApi31.kt @@ -0,0 +1,59 @@ +package com.fsck.k9.controller.push + +import android.app.AlarmManager +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.os.Build +import androidx.annotation.RequiresApi +import androidx.core.content.ContextCompat +import com.fsck.k9.helper.AlarmManagerCompat +import timber.log.Timber + +/** + * Starting with Android 12 we have to check whether the app can schedule exact alarms. + */ +@RequiresApi(Build.VERSION_CODES.S) +internal class AlarmPermissionManagerApi31( + private val context: Context, + private val alarmManagerCompat: AlarmManagerCompat, +) : AlarmPermissionManager { + private var isRegistered = false + private var listener: AlarmPermissionListener? = null + + private val intentFilter = IntentFilter().apply { + addAction(AlarmManager.ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED) + } + + private val receiver = object : BroadcastReceiver() { + override fun onReceive(context: Context, intent: Intent?) { + val listener = synchronized(this@AlarmPermissionManagerApi31) { listener } + listener?.onAlarmPermissionGranted() + } + } + + override fun canScheduleExactAlarms(): Boolean { + return alarmManagerCompat.canScheduleExactAlarms() + } + + @Synchronized + override fun registerListener(listener: AlarmPermissionListener) { + if (!isRegistered) { + Timber.v("Registering alarm permission listener") + isRegistered = true + this.listener = listener + ContextCompat.registerReceiver(context, receiver, intentFilter, ContextCompat.RECEIVER_NOT_EXPORTED) + } + } + + @Synchronized + override fun unregisterListener() { + if (isRegistered) { + Timber.v("Unregistering alarm permission listener") + isRegistered = false + listener = null + context.unregisterReceiver(receiver) + } + } +} diff --git a/app/core/src/main/java/com/fsck/k9/controller/push/KoinModule.kt b/app/core/src/main/java/com/fsck/k9/controller/push/KoinModule.kt index c8b3c2010..52db5332b 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/push/KoinModule.kt +++ b/app/core/src/main/java/com/fsck/k9/controller/push/KoinModule.kt @@ -22,9 +22,12 @@ internal val controllerPushModule = module { pushServiceManager = get(), bootCompleteManager = get(), autoSyncManager = get(), + alarmPermissionManager = get(), pushNotificationManager = get(), connectivityManager = get(), accountPushControllerFactory = get(), ) } + + single { AlarmPermissionManager(context = get(), alarmManagerCompat = get()) } } diff --git a/app/core/src/main/java/com/fsck/k9/controller/push/PushController.kt b/app/core/src/main/java/com/fsck/k9/controller/push/PushController.kt index 9e87b489b..272365b56 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/push/PushController.kt +++ b/app/core/src/main/java/com/fsck/k9/controller/push/PushController.kt @@ -7,6 +7,7 @@ import com.fsck.k9.network.ConnectivityChangeListener import com.fsck.k9.network.ConnectivityManager import com.fsck.k9.notification.PushNotificationManager import com.fsck.k9.notification.PushNotificationState +import com.fsck.k9.notification.PushNotificationState.ALARM_PERMISSION_MISSING import com.fsck.k9.notification.PushNotificationState.LISTENING import com.fsck.k9.notification.PushNotificationState.WAIT_BACKGROUND_SYNC import com.fsck.k9.notification.PushNotificationState.WAIT_NETWORK @@ -28,6 +29,7 @@ import timber.log.Timber /** * Starts and stops [AccountPushController]s as necessary. Manages the Push foreground service. */ +@Suppress("LongParameterList") class PushController internal constructor( private val accountManager: AccountManager, private val generalSettingsManager: GeneralSettingsManager, @@ -35,6 +37,7 @@ class PushController internal constructor( private val pushServiceManager: PushServiceManager, private val bootCompleteManager: BootCompleteManager, private val autoSyncManager: AutoSyncManager, + private val alarmPermissionManager: AlarmPermissionManager, private val pushNotificationManager: PushNotificationManager, private val connectivityManager: ConnectivityManager, private val accountPushControllerFactory: AccountPushControllerFactory, @@ -50,6 +53,7 @@ class PushController internal constructor( override fun onConnectivityChanged() = this@PushController.onConnectivityChanged() override fun onConnectivityLost() = this@PushController.onConnectivityLost() } + private val alarmPermissionListener = AlarmPermissionListener(::onAlarmPermissionGranted) /** * Initialize [PushController]. @@ -109,6 +113,10 @@ class PushController internal constructor( launchUpdatePushers() } + private fun onAlarmPermissionGranted() { + launchUpdatePushers() + } + private fun onConnectivityChanged() { coroutineScope.launch(coroutineDispatcher) { synchronized(lock) { @@ -142,17 +150,24 @@ class PushController internal constructor( } } + @Suppress("LongMethod", "CyclomaticComplexMethod") private fun updatePushers() { Timber.v("PushController.updatePushers()") val generalSettings = generalSettingsManager.getSettings() + val alarmPermissionMissing = !alarmPermissionManager.canScheduleExactAlarms() val backgroundSyncDisabledViaSystem = autoSyncManager.isAutoSyncDisabled val backgroundSyncDisabledInApp = generalSettings.backgroundSync == BackgroundSync.NEVER val networkNotAvailable = !connectivityManager.isNetworkAvailable() val realPushAccounts = getPushAccounts() - val pushAccounts = if (backgroundSyncDisabledViaSystem || backgroundSyncDisabledInApp || networkNotAvailable) { + val shouldDisablePushAccounts = backgroundSyncDisabledViaSystem || + backgroundSyncDisabledInApp || + networkNotAvailable || + alarmPermissionMissing + + val pushAccounts = if (shouldDisablePushAccounts) { emptyList() } else { realPushAccounts @@ -202,6 +217,11 @@ class PushController internal constructor( startServices() } + alarmPermissionMissing -> { + setPushNotificationState(ALARM_PERMISSION_MISSING) + startServices() + } + arePushersActive -> { setPushNotificationState(LISTENING) startServices() @@ -228,6 +248,7 @@ class PushController internal constructor( bootCompleteManager.enableReceiver() registerAutoSyncListener() registerConnectivityChangeListener() + registerAlarmPermissionListener() connectivityManager.start() } @@ -236,6 +257,7 @@ class PushController internal constructor( bootCompleteManager.disableReceiver() autoSyncManager.unregisterListener() unregisterConnectivityChangeListener() + alarmPermissionManager.unregisterListener() connectivityManager.stop() } @@ -254,4 +276,10 @@ class PushController internal constructor( private fun unregisterConnectivityChangeListener() { connectivityManager.removeListener(connectivityChangeListener) } + + private fun registerAlarmPermissionListener() { + if (!alarmPermissionManager.canScheduleExactAlarms()) { + alarmPermissionManager.registerListener(alarmPermissionListener) + } + } } diff --git a/app/core/src/main/java/com/fsck/k9/notification/PushNotificationManager.kt b/app/core/src/main/java/com/fsck/k9/notification/PushNotificationManager.kt index 6c2c7b08b..c845a0adc 100644 --- a/app/core/src/main/java/com/fsck/k9/notification/PushNotificationManager.kt +++ b/app/core/src/main/java/com/fsck/k9/notification/PushNotificationManager.kt @@ -1,8 +1,12 @@ package com.fsck.k9.notification import android.app.Notification +import android.app.PendingIntent import android.content.Context import android.content.Intent +import android.net.Uri +import android.os.Build +import android.provider.Settings import androidx.core.app.NotificationCompat import androidx.core.app.NotificationManagerCompat import androidx.core.app.PendingIntentCompat @@ -48,26 +52,47 @@ internal class PushNotificationManager( } private fun createNotification(): Notification { - val intent = Intent(PUSH_INFO_ACTION).apply { - addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) - setPackage(context.packageName) - } - val contentIntent = PendingIntentCompat.getActivity(context, 1, intent, 0, false) - return NotificationCompat.Builder(context, notificationChannelManager.pushChannelId) .setSmallIcon(resourceProvider.iconPushNotification) .setContentTitle(resourceProvider.pushNotificationText(notificationState)) - .setContentText(resourceProvider.pushNotificationInfoText()) - .setContentIntent(contentIntent) + .setContentText(getContentText()) + .setContentIntent(getContentIntent()) .setOngoing(true) - .setNotificationSilent() + .setSilent(true) .setPriority(NotificationCompat.PRIORITY_MIN) .setBadgeIconType(NotificationCompat.BADGE_ICON_NONE) .setLocalOnly(true) .setShowWhen(false) .build() } + + private fun getContentIntent(): PendingIntent { + val intent = if (notificationState == PushNotificationState.ALARM_PERMISSION_MISSING) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) { + error("ACTION_REQUEST_SCHEDULE_EXACT_ALARM is only available on API 31+") + } + + Intent(Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM).apply { + data = Uri.parse("package:${context.packageName}") + } + } else { + Intent(PUSH_INFO_ACTION).apply { + addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) + setPackage(context.packageName) + } + } + + return PendingIntentCompat.getActivity(context, 1, intent, 0, false)!! + } + + private fun getContentText(): String { + return if (notificationState == PushNotificationState.ALARM_PERMISSION_MISSING) { + resourceProvider.pushNotificationGrantAlarmPermissionText() + } else { + resourceProvider.pushNotificationInfoText() + } + } } enum class PushNotificationState { @@ -75,4 +100,5 @@ enum class PushNotificationState { LISTENING, WAIT_BACKGROUND_SYNC, WAIT_NETWORK, + ALARM_PERMISSION_MISSING, } diff --git a/app/core/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt b/app/core/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt index d13be3af8..21cd52efa 100644 --- a/app/core/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt +++ b/app/core/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt @@ -39,4 +39,5 @@ class TestCoreResourceProvider : CoreResourceProvider { } override fun pushNotificationInfoText(): String = throw UnsupportedOperationException("not implemented") + override fun pushNotificationGrantAlarmPermissionText() = throw UnsupportedOperationException("not implemented") } diff --git a/app/ui/legacy/src/main/res/values/strings.xml b/app/ui/legacy/src/main/res/values/strings.xml index 8430e1867..e37b470a7 100644 --- a/app/ui/legacy/src/main/res/values/strings.xml +++ b/app/ui/legacy/src/main/res/values/strings.xml @@ -1098,7 +1098,9 @@ You can keep this message and use it as a backup for your secret key. If you wan Waiting for new emails Sleeping until background sync is allowed Sleeping until network is available + Missing permission to schedule alarms Tap to learn more. + Tap to grant permission. Push Info When using Push, K-9 Mail maintains a connection to the mail server. Android requires displaying an ongoing notification while the app is active in the background. %s diff --git a/app/ui/legacy/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt b/app/ui/legacy/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt index 6669e6541..5b52da3e9 100644 --- a/app/ui/legacy/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt +++ b/app/ui/legacy/src/test/java/com/fsck/k9/TestCoreResourceProvider.kt @@ -39,4 +39,5 @@ class TestCoreResourceProvider : CoreResourceProvider { } override fun pushNotificationInfoText(): String = throw UnsupportedOperationException("not implemented") + override fun pushNotificationGrantAlarmPermissionText() = throw UnsupportedOperationException("not implemented") } diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/BackendIdleRefreshManager.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/BackendIdleRefreshManager.kt index 7e3ec87be..06f506585 100644 --- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/BackendIdleRefreshManager.kt +++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/BackendIdleRefreshManager.kt @@ -19,10 +19,6 @@ class BackendIdleRefreshManager(private val alarmManager: SystemAlarmManager) : private var minTimeout = Long.MAX_VALUE private var minTimeoutTimestamp = 0L - override fun canScheduleTimers(): Boolean { - return alarmManager.canScheduleExactAlarms() - } - @Synchronized override fun startTimer(timeout: Long, callback: Callback): IdleRefreshTimer { require(timeout > MIN_TIMER_DELTA) { "Timeout needs to be greater than $MIN_TIMER_DELTA ms" } diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt index 37bb1cf75..f9f31ba38 100644 --- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt +++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt @@ -50,11 +50,6 @@ internal class ImapBackendPusher( private var currentIdleRefreshMs = 15 * 60 * 1000L override fun start() { - if (!idleRefreshManager.canScheduleTimers()) { - Timber.v("Not starting ImapBackendPusher for %s because the app can't schedule timers", accountName) - return - } - coroutineScope.launch { pushConfigProvider.maxPushFoldersFlow.collect { maxPushFolders -> currentMaxPushFolders = maxPushFolders diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/SystemAlarmManager.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/SystemAlarmManager.kt index be6a25ed4..e2133cfd0 100644 --- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/SystemAlarmManager.kt +++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/SystemAlarmManager.kt @@ -1,7 +1,6 @@ package com.fsck.k9.backend.imap interface SystemAlarmManager { - fun canScheduleExactAlarms(): Boolean fun setAlarm(triggerTime: Long, callback: () -> Unit) fun cancelAlarm() fun now(): Long diff --git a/backend/imap/src/test/java/com/fsck/k9/backend/imap/BackendIdleRefreshManagerTest.kt b/backend/imap/src/test/java/com/fsck/k9/backend/imap/BackendIdleRefreshManagerTest.kt index c63c03549..bcca71cbe 100644 --- a/backend/imap/src/test/java/com/fsck/k9/backend/imap/BackendIdleRefreshManagerTest.kt +++ b/backend/imap/src/test/java/com/fsck/k9/backend/imap/BackendIdleRefreshManagerTest.kt @@ -156,10 +156,6 @@ class MockSystemAlarmManager(startTime: Long) : SystemAlarmManager { var callback: Callback? = null val alarmTimes = mutableListOf() - override fun canScheduleExactAlarms(): Boolean { - throw UnsupportedOperationException("not implemented") - } - override fun setAlarm(triggerTime: Long, callback: () -> Unit) { this.triggerTime = triggerTime this.callback = callback diff --git a/docs/RELEASING.md b/docs/RELEASING.md index 6668cb7d9..ba1dd2916 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -43,7 +43,7 @@ 1. Update versionCode and versionName in `app-k9mail/build.gradle.kts` 2. Create change log entries in - `app/ui/legacy/src/main/res/raw/changelog_master.xml` - - `app-k9mail/fastlane/metadata/android/en-US/changelogs/${versionCode}.txt` + - `app-metadata/com.fsck.k9/en-US/changelogs/${versionCode}.txt` Use past tense. Try to keep them high level. Focus on the user (experience). 3. Commit the changes. Message: "Version $versionName" 4. Run `./gradlew clean :app-k9mail:assembleRelease --no-build-cache --no-configuration-cache` @@ -83,6 +83,25 @@ of the previous entry and adjusting `versionName`, `versionCode`, and `commit` (use the tag name). Leave `CurrentVersion` and `CurrentVersionCode` unchanged. Those specify which version is the stable/recommended build. + + Example: + + ```yaml + - versionName: "${versionName}" + versionCode: ${versionCode} + commit: "${tagName}" + subdir: app-k9mail + prebuild: ( cd .. && ln -s app-metadata/com.fsck.k9 metadata ) + sudo: + - apt-get update + - apt-get install -y openjdk-17-jdk-headless + - update-alternatives --auto java + gradle: + - yes + scandelete: + - build-plugin/build + ``` + 4. Commit the changes. Message: "Update K-9 Mail to $newVersionName (beta)" 5. Run `fdroid build --latest com.fsck.k9` to build the project using F-Droid's toolchain. 6. Push the changes to your fork of the _fdroiddata_ repository. @@ -99,7 +118,7 @@ 4. Click on _Create new release_ 5. Upload the APK to _App bundles_ 6. Fill out Release name (e.g. "$versionCode ($versionName)") -7. Fill out Release notes (copy from `app-k9mail/fastlane/metadata/android/en-US/changelogs/${versionCode}.txt`) +7. Fill out Release notes (copy from `app-metadata/com.fsck.k9/en-US/changelogs/${versionCode}.txt`) 8. Click _Next_ 9. Review the release 10. Configure a full rollout for beta versions @@ -152,6 +171,25 @@ 3. Edit `metadata/com.fsck.k9.yml` to create a new entry for the version you want to release. Usually it's copy & paste of the previous entry and adjusting `versionName`, `versionCode`, and `commit` (use the tag name). Change `CurrentVersion` and `CurrentVersionCode` to the new values, making this the new stable/recommended build. + + Example: + + ```yaml + - versionName: "${versionName}" + versionCode: ${versionCode} + commit: "${tagName}" + subdir: app-k9mail + prebuild: ( cd .. && ln -s app-metadata/com.fsck.k9 metadata ) + sudo: + - apt-get update + - apt-get install -y openjdk-17-jdk-headless + - update-alternatives --auto java + gradle: + - yes + scandelete: + - build-plugin/build + ``` + 4. Commit the changes. Message: "Update K-9 Mail to $newVersionName" 5. Run `fdroid build --latest com.fsck.k9` to build the project using F-Droid's toolchain. 6. Push the changes to your fork of the _fdroiddata_ repository. diff --git a/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/ImapFormItems.kt b/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/ImapFormItems.kt index cdbba43aa..6bac65fa5 100644 --- a/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/ImapFormItems.kt +++ b/feature/account/server/settings/src/main/kotlin/app/k9mail/feature/account/server/settings/ui/incoming/content/ImapFormItems.kt @@ -55,7 +55,7 @@ internal fun LazyListScope.imapFormItems( item { CheckboxInput( - text = stringResource(R.string.account_server_settings_incoming_imap_send_client_id_label), + text = stringResource(R.string.account_server_settings_incoming_imap_send_client_info_label), checked = state.imapSendClientId, onCheckedChange = { onEvent(Event.ImapSendClientIdChanged(it)) }, contentPadding = defaultItemPadding(), diff --git a/feature/account/server/settings/src/main/res/values/strings.xml b/feature/account/server/settings/src/main/res/values/strings.xml index 8343f8cf4..82292d14b 100644 --- a/feature/account/server/settings/src/main/res/values/strings.xml +++ b/feature/account/server/settings/src/main/res/values/strings.xml @@ -25,7 +25,7 @@ Auto-detect IMAP namespace IMAP path prefix Use compression - Send client ID + Send client information Outgoing server settings diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/IdleRefreshManager.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/IdleRefreshManager.kt index 694d4617f..124c95d98 100644 --- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/IdleRefreshManager.kt +++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/IdleRefreshManager.kt @@ -1,7 +1,6 @@ package com.fsck.k9.mail.store.imap interface IdleRefreshManager { - fun canScheduleTimers(): Boolean fun startTimer(timeout: Long, callback: () -> Unit): IdleRefreshTimer fun resetTimers() } diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapFolderFetcher.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapFolderFetcher.kt index 11c32bd47..6479e0d38 100644 --- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapFolderFetcher.kt +++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapFolderFetcher.kt @@ -41,6 +41,7 @@ class ImapFolderFetcher internal constructor( val config = object : ImapStoreConfig { override val logLabel = "folder-fetcher" override fun isSubscribedFoldersOnly() = false + override fun isExpungeImmediately() = false override fun clientId() = ImapClientId(appName = clientIdAppName, appVersion = clientIdAppVersion) } val oAuth2TokenProvider = createOAuth2TokenProviderOrNull(authStateStorage) diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapServerSettingsValidator.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapServerSettingsValidator.kt index 2c71b3d48..82cb34bae 100644 --- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapServerSettingsValidator.kt +++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapServerSettingsValidator.kt @@ -32,6 +32,7 @@ class ImapServerSettingsValidator( val config = object : ImapStoreConfig { override val logLabel = "check" override fun isSubscribedFoldersOnly() = false + override fun isExpungeImmediately() = false override fun clientId() = ImapClientId(appName = clientIdAppName, appVersion = clientIdAppVersion) } val oAuth2TokenProvider = createOAuth2TokenProviderOrNull(authStateStorage) diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapStoreConfig.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapStoreConfig.kt index e767f16aa..989899e4c 100644 --- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapStoreConfig.kt +++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/ImapStoreConfig.kt @@ -3,5 +3,6 @@ package com.fsck.k9.mail.store.imap interface ImapStoreConfig { val logLabel: String fun isSubscribedFoldersOnly(): Boolean + fun isExpungeImmediately(): Boolean fun clientId(): ImapClientId } diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/InternalImapStore.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/InternalImapStore.kt index 2ae729c46..647327f8f 100644 --- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/InternalImapStore.kt +++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/InternalImapStore.kt @@ -4,6 +4,7 @@ import com.fsck.k9.mail.Flag internal interface InternalImapStore { val logLabel: String + val config: ImapStoreConfig fun getCombinedPrefix(): String diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt index 84262d4e2..9d36ec012 100644 --- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt +++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt @@ -354,7 +354,7 @@ internal class RealImapFolder( val uidMapping = copyMessages(messages, folder) setFlags(messages, setOf(Flag.DELETED), true) - expungeUidsOnly(uids) + expungeUidsAfterDelete(uids) return uidMapping } @@ -1117,8 +1117,8 @@ internal class RealImapFolder( expungeUids(uids, fullExpungeFallback = true) } - private fun expungeUidsOnly(uids: List) { - expungeUids(uids, fullExpungeFallback = false) + private fun expungeUidsAfterDelete(uids: List) { + expungeUids(uids, fullExpungeFallback = internalImapStore.config.isExpungeImmediately()) } private fun expungeUids(uids: List, fullExpungeFallback: Boolean) { diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapStore.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapStore.kt index 1542fb798..7f3e07ab2 100644 --- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapStore.kt +++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapStore.kt @@ -20,7 +20,7 @@ import java.util.LinkedList internal open class RealImapStore( private val serverSettings: ServerSettings, - private val config: ImapStoreConfig, + override val config: ImapStoreConfig, private val trustedSocketFactory: TrustedSocketFactory, private val oauthTokenProvider: OAuth2TokenProvider?, ) : ImapStore, ImapConnectionManager, InternalImapStore { diff --git a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/FakeImapStoreConfig.kt b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/FakeImapStoreConfig.kt new file mode 100644 index 000000000..2e7fbfdea --- /dev/null +++ b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/FakeImapStoreConfig.kt @@ -0,0 +1,17 @@ +package com.fsck.k9.mail.store.imap + +class FakeImapStoreConfig : ImapStoreConfig { + var expungeImmediately = true + + override var logLabel: String = "irrelevant" + + override fun isSubscribedFoldersOnly(): Boolean { + throw UnsupportedOperationException("not implemented") + } + + override fun isExpungeImmediately(): Boolean = expungeImmediately + + override fun clientId(): ImapClientId { + throw UnsupportedOperationException("not implemented") + } +} diff --git a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt index acb4b80c5..a213ccde1 100644 --- a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt +++ b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt @@ -54,8 +54,10 @@ import org.mockito.kotlin.stub import org.mockito.kotlin.whenever class RealImapFolderTest { + private val imapStoreConfig = FakeImapStoreConfig() private val internalImapStore = object : InternalImapStore { override val logLabel = "Account" + override val config = imapStoreConfig override fun getCombinedPrefix() = "" override fun getPermanentFlagsIndex() = mutableSetOf() } @@ -355,7 +357,26 @@ class RealImapFolderTest { } @Test - fun `moveMessages() should delete messages from source folder but not issue EXPUNGE command`() { + fun `moveMessages() with expungeImmediately = true should delete and expunge`() { + imapStoreConfig.expungeImmediately = true + val sourceFolder = createFolder("Folder") + prepareImapFolderForOpen(OpenMode.READ_WRITE) + imapConnection.stub { + on { isUidPlusCapable } doReturn false + } + val destinationFolder = createFolder("Destination") + val messages = listOf(createImapMessage("1")) + sourceFolder.open(OpenMode.READ_WRITE) + + sourceFolder.moveMessages(messages, destinationFolder) + + assertCommandWithIdsIssued("UID STORE 1 +FLAGS.SILENT (\\Deleted)") + assertCommandIssued("EXPUNGE") + } + + @Test + fun `moveMessages() with expungeImmediately = false should delete but not expunge`() { + imapStoreConfig.expungeImmediately = false val sourceFolder = createFolder("Folder") prepareImapFolderForOpen(OpenMode.READ_WRITE) imapConnection.stub { diff --git a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt index 5bd444635..42485bc9a 100644 --- a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt +++ b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt @@ -408,6 +408,7 @@ class RealImapStoreTest { return object : ImapStoreConfig { override val logLabel: String = "irrelevant" override fun isSubscribedFoldersOnly(): Boolean = isSubscribedFoldersOnly + override fun isExpungeImmediately(): Boolean = true override fun clientId(): ImapClientId = ImapClientId(appName = "irrelevant", appVersion = "irrelevant") } } diff --git a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/TestIdleRefreshManager.kt b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/TestIdleRefreshManager.kt index 33c12d73c..ce764be2d 100644 --- a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/TestIdleRefreshManager.kt +++ b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/TestIdleRefreshManager.kt @@ -1,14 +1,8 @@ package com.fsck.k9.mail.store.imap -class TestIdleRefreshManager( - private val areTimersSupported: Boolean = true, -) : IdleRefreshManager { +class TestIdleRefreshManager : IdleRefreshManager { private val timers = mutableListOf() - override fun canScheduleTimers(): Boolean { - return areTimersSupported - } - @Synchronized override fun startTimer(timeout: Long, callback: () -> Unit): TestIdleRefreshTimer { return TestIdleRefreshTimer(timeout, callback).also { timer -> timers.add(timer) }