From f4d88cc0876ec29ff46dbda0159168ebee637afb Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 10 Feb 2024 18:03:09 +0100 Subject: [PATCH] Fix various linter warnings Among others: - Use `apply` instead of `commit` when saving shared preferences. - Avoid inlined Api - Remove unused resources --- AndroidManifest.xml | 7 ++++--- build.gradle | 5 +++++ res/layout/dialog_edit_text.xml | 2 +- res/layout/launcher_activity.xml | 4 ++-- res/values-cs/strings.xml | 4 +--- res/values-de/strings.xml | 4 +--- res/values-es/strings.xml | 4 +--- res/values-fa/strings.xml | 4 +--- res/values-fr/strings.xml | 4 +--- res/values-it/strings.xml | 4 +--- res/values-ko/strings.xml | 4 +--- res/values-land/dimens.xml | 4 ---- res/values-lv/strings.xml | 4 +--- res/values-pl/strings.xml | 4 +--- res/values-pt/strings.xml | 4 +--- res/values-ro/strings.xml | 4 +--- res/values-ru/strings.xml | 4 +--- res/values-tr/strings.xml | 4 +--- res/values-uk/strings.xml | 4 +--- res/values-vi/strings.xml | 4 +--- res/values-zh-rCN/strings.xml | 4 +--- res/values/strings.xml | 5 +---- res/values/values.xml | 1 - srcs/juloo.keyboard2/Config.java | 2 +- srcs/juloo.keyboard2/DirectBootAwarePreferences.java | 4 ++-- srcs/juloo.keyboard2/KeyEventHandler.java | 2 ++ srcs/juloo.keyboard2/Keyboard2View.java | 4 +++- srcs/juloo.keyboard2/Utils.java | 3 ++- srcs/juloo.keyboard2/VoiceImeSwitcher.java | 2 +- 29 files changed, 40 insertions(+), 69 deletions(-) delete mode 100644 res/values-land/dimens.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 7cdbcda..a76585c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,5 +1,8 @@ + + + @@ -12,15 +15,13 @@ - + - - diff --git a/build.gradle b/build.gradle index 8ff3f0d..139b27b 100644 --- a/build.gradle +++ b/build.gradle @@ -77,6 +77,11 @@ android { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } + + lintOptions { + // Translation are already checked by 'syncTranslations' + disable 'MissingTranslation' + } } dependencies { diff --git a/res/layout/dialog_edit_text.xml b/res/layout/dialog_edit_text.xml index ad07947..5b935dc 100644 --- a/res/layout/dialog_edit_text.xml +++ b/res/layout/dialog_edit_text.xml @@ -1,4 +1,4 @@ - + diff --git a/res/layout/launcher_activity.xml b/res/layout/launcher_activity.xml index c007299..4e0cc0c 100644 --- a/res/layout/launcher_activity.xml +++ b/res/layout/launcher_activity.xml @@ -1,12 +1,12 @@ - +