From eaa9d091c34d5c26d57b4750d840a624c11de78c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 25 Sep 2022 17:05:15 +0200 Subject: [PATCH] lets not list Simple Launcher at the apps --- .../simplemobiletools/launcher/activities/MainActivity.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt index 52e6937..deeab68 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt @@ -346,11 +346,16 @@ class MainActivity : SimpleActivity(), FlingListener { val intent = Intent(Intent.ACTION_MAIN, null) intent.addCategory(Intent.CATEGORY_LAUNCHER) + val simpleLauncher = applicationContext.packageName val list = packageManager.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED) for (info in list) { val componentInfo = info.activityInfo.applicationInfo val label = info.loadLabel(packageManager).toString() val packageName = componentInfo.packageName + if (packageName == simpleLauncher) { + continue + } + val drawable = getDrawableForPackageName(packageName) ?: continue val placeholderColor = calculateAverageColor(drawable.toBitmap())