lets not list Simple Launcher at the apps
This commit is contained in:
parent
32cdd98534
commit
eaa9d091c3
1 changed files with 5 additions and 0 deletions
|
@ -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())
|
||||
|
||||
|
|
Loading…
Reference in a new issue