diff --git a/.github/workflows/android_branch_ci.yml b/.github/workflows/android_branch_ci.yml index 0b244f24..a2027cb5 100644 --- a/.github/workflows/android_branch_ci.yml +++ b/.github/workflows/android_branch_ci.yml @@ -19,5 +19,7 @@ jobs: with: distribution: 'temurin' java-version: 17 + - name: Lint Android + run: ./gradlew lint - name: Build with Gradle run: ./gradlew build \ No newline at end of file diff --git a/.github/workflows/android_master_ci.yml b/.github/workflows/android_master_ci.yml index 947e9ddc..7f6050ae 100644 --- a/.github/workflows/android_master_ci.yml +++ b/.github/workflows/android_master_ci.yml @@ -18,6 +18,8 @@ jobs: with: distribution: 'temurin' java-version: 17 + - name: Lint Android + run: ./gradlew lint - name: Build with Gradle run: ./gradlew build - name: Build Signed APK diff --git a/.github/workflows/android_pr_ci.yml b/.github/workflows/android_pr_ci.yml index ca379f66..960a465c 100644 --- a/.github/workflows/android_pr_ci.yml +++ b/.github/workflows/android_pr_ci.yml @@ -18,6 +18,8 @@ jobs: with: distribution: 'temurin' java-version: 17 + - name: Lint Android + run: ./gradlew lint - name: Build with Gradle run: ./gradlew build - name: Upload APK diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8747bdf2..e39932c9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -58,6 +58,11 @@ android { testOptions { unitTests.isIncludeAndroidResources = true } + lint { + warningsAsErrors = true + disable += "Typos" + disable += "VectorPath" + } namespace = "com.sduduzog.slimlauncher" applicationVariants.all{ outputs.all { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b6ec1134..8f8d5df7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -11,15 +11,13 @@ + tools:ignore="GoogleAppIndexingWarning"> ){ this.apps = apps notifyDataSetChanged() diff --git a/app/src/main/java/com/sduduzog/slimlauncher/adapters/CustomAppsAdapter.kt b/app/src/main/java/com/sduduzog/slimlauncher/adapters/CustomAppsAdapter.kt index e990fbd2..86a5dbfd 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/adapters/CustomAppsAdapter.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/adapters/CustomAppsAdapter.kt @@ -41,6 +41,7 @@ class CustomAppsAdapter(private val listener: OnShitDoneToAppsListener) : Recycl } } + @SuppressLint("NotifyDataSetChanged") fun setItems(apps: List) { this.apps = sanitiseIndexes(apps) as MutableList notifyDataSetChanged() diff --git a/app/src/main/java/com/sduduzog/slimlauncher/adapters/HomeAdapter.kt b/app/src/main/java/com/sduduzog/slimlauncher/adapters/HomeAdapter.kt index 7289fed3..13767fa5 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/adapters/HomeAdapter.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/adapters/HomeAdapter.kt @@ -1,5 +1,6 @@ package com.sduduzog.slimlauncher.adapters +import android.annotation.SuppressLint import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -37,6 +38,7 @@ class HomeAdapter( override fun getItemCount(): Int = apps.size + @SuppressLint("NotifyDataSetChanged") fun setItems(list: List) { this.apps = list notifyDataSetChanged() diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDialog.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDialog.kt index 0b8a1d27..4e4f9399 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDialog.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDialog.kt @@ -18,7 +18,7 @@ class RenameAppDialog : DialogFragment() { private lateinit var model: CustomiseAppsViewModel override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - val view = LayoutInflater.from(context).inflate(R.layout.rename_dialog_edit_text, customise_apps_fragment, false) + val view = layoutInflater.inflate(R.layout.rename_dialog_edit_text, customise_apps_fragment, false) val editText: EditText = view.findViewById(R.id.rename_editText) val appName: String = app.appNickname ?: app.appName editText.text.append(appName) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDisplayNameDialog.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDisplayNameDialog.kt index 7fd5bd52..7478d95f 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDisplayNameDialog.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/dialogs/RenameAppDisplayNameDialog.kt @@ -17,7 +17,7 @@ class RenameAppDisplayNameDialog : DialogFragment() { private lateinit var unlauncherAppsRepo: UnlauncherAppsRepository override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - val view = LayoutInflater.from(context).inflate(R.layout.rename_dialog_edit_text, customise_apps_fragment, false) + val view = layoutInflater.inflate(R.layout.rename_dialog_edit_text, customise_apps_fragment, false) val editText: EditText = view.findViewById(R.id.rename_editText) val appName: String = app.displayName editText.text.append(appName) diff --git a/app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt b/app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt index 6bf7471c..7a33e2fe 100644 --- a/app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt +++ b/app/src/main/java/com/sduduzog/slimlauncher/ui/main/HomeFragment.kt @@ -1,5 +1,6 @@ package com.sduduzog.slimlauncher.ui.main +import android.annotation.SuppressLint import android.app.Activity import android.content.ActivityNotFoundException import android.content.BroadcastReceiver @@ -371,6 +372,7 @@ class HomeFragment : BaseFragment(), OnLaunchAppListener { } inner class AppDrawerListener { + @SuppressLint("DiscouragedPrivateApi") fun onAppLongClicked(app : UnlauncherApp, view: View) : Boolean { val popupMenu = PopupMenu(context, view) popupMenu.inflate(R.menu.app_long_press_menu) diff --git a/app/src/main/res/drawable/ic_launcher_monochrome.xml b/app/src/main/res/drawable/ic_launcher_monochrome.xml new file mode 100644 index 00000000..57a8d164 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_monochrome.xml @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/main_activity.xml b/app/src/main/res/layout/main_activity.xml index f9507306..fc9eb30c 100644 --- a/app/src/main/res/layout/main_activity.xml +++ b/app/src/main/res/layout/main_activity.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" tools:context=".MainActivity"> - + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index c4a603d4..d623fae8 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -2,4 +2,5 @@ + \ No newline at end of file diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 2ac75659..2a2326d8 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -70,8 +70,6 @@ Appschublade Knöpfe einstellen Geräteeinstellungen - Statusleiste verstecken - Statusleiste zeigen Statusleiste umschalten "Alle Apps bleiben installiert." "Bitte das Leeren der Liste bestätigen." diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index e0ecc0a4..58c98b42 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -34,8 +34,6 @@ Format de l’Heure Applications Personnalisées Paramètres Système - Cacher la Barre de Statut - Afficher la Barre de Statut Afficher/Cacher la Barre de Statut "Cette action ne supprimera aucune application de l’appareil." "Il s’agit seulement de confirmer la purgation de la liste." diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index abfc503e..e7b88047 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -36,7 +36,5 @@ Elenco applicazioni Pulsanti rapidi Impostazioni del dispositivo - Nascondi la barra di stato - Mostra la barra di stato Mostra/nascondi barra di stato diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index f51a3a41..cf803747 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -29,8 +29,6 @@ Tidsformat Tilpass programmer Enhetsinnstillinger - Skjul statusfelt - Vis statusfelt Statusfelt på/av "Programmene dine blir ikke avinstallert." "Dette bekrefter kun at du fjerner listen med overlegg." diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index a3d9030d..3a6d6369 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -30,7 +30,5 @@ Kies de tijdopmaak Apps aanpassen Systeeminstellingen - Statusbalk verbergen - Statusbalk tonen Statusbalk tonen/verbergen diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 579c1c1c..52281354 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -64,8 +64,6 @@ Настроить выдвигающийся список Настроить кнопки быстрого запуска Настройки устройства - Скрыть строку состояния - Показать строку состояния Скрыть/показать строку состояния "Это действие не удалит Ваши приложения." "Это только для того чтобы подвтердить, что Вы делаете это осмысленно." diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index d97aae35..1baaebe5 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -13,7 +13,5 @@ Обрати формат часу Налаштування програм Налаштування пристрою - Сховати рядок стану - Показати рядок стану Вкл\\вимк смужку стану \ No newline at end of file diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index b74280cc..9d7217da 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -78,10 +78,7 @@ 自定义抽屉 自定义快捷按钮 设备设置 - 隐藏状态栏 - 显示状态栏 切换状态栏状态 - settings "此操作不会卸载你的应用。" "只想确认一下你是否有意清除这个列表。" 删除全部应用 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 5a611195..0665a512 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -29,8 +29,6 @@ 選擇時間格式 挑選應用程序 設備設置 - 隱藏狀態欄 - 顯示狀態欄 顯示或隱藏狀態欄 "這個選項不會卸載你的應用程序." "這只是爲了確定你想清空這個清單." diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index a5b623aa..00000000 --- a/app/src/main/res/values/ic_launcher_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #FFFFFFFF - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6c050d69..ea7d3964 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -7,7 +7,6 @@ key_theme time_format hide_status_bar - https://github.com/jkuester/unlauncher left @@ -85,8 +84,6 @@ Customise Drawer Customise Quick Buttons Device Settings - Hide Status Bar - Show Status Bar Toggle Status Bar "This action will not uninstall your apps." "It is just to confirm if you're clearing this list on purpose"