lets not list Simple Launcher at the apps
This commit is contained in:
parent
32cdd98534
commit
eaa9d091c3
|
@ -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 New Issue