Extend icon pack intent filter
This commit is contained in:
parent
e28c6aa463
commit
94a7b555ba
@ -277,15 +277,19 @@ class AppFilterIconPackInstaller(
|
|||||||
override fun getInstalledIconPacks(): List<IconPack> {
|
override fun getInstalledIconPacks(): List<IconPack> {
|
||||||
val packs = mutableListOf<IconPack>()
|
val packs = mutableListOf<IconPack>()
|
||||||
val pm = context.packageManager
|
val pm = context.packageManager
|
||||||
var intent = Intent("app.lawnchair.icons.THEMED_ICON")
|
|
||||||
val themedPacks = pm.queryIntentActivities(intent, 0)
|
val intents = listOf(
|
||||||
packs.addAll(themedPacks.map { IconPack(context, it, true) })
|
Intent("app.lawnchair.icons.THEMED_ICON"),
|
||||||
intent = Intent("org.adw.ActivityStarter.THEMES")
|
Intent("org.adw.ActivityStarter.THEMES"),
|
||||||
val adwPacks = pm.queryIntentActivities(intent, 0)
|
Intent("com.novalauncher.THEME"),
|
||||||
packs.addAll(adwPacks.map { IconPack(context, it, false) })
|
Intent("org.adw.launcher.THEMES")
|
||||||
intent = Intent("com.novalauncher.THEME")
|
)
|
||||||
val novaPacks = pm.queryIntentActivities(intent, 0)
|
|
||||||
packs.addAll(novaPacks.map { IconPack(context, it, false) })
|
for (intent in intents) {
|
||||||
|
packs.addAll(
|
||||||
|
pm.queryIntentActivities(intent, 0).map { IconPack(context, it, true) }
|
||||||
|
)
|
||||||
|
}
|
||||||
return packs.distinctBy { it.packageName }
|
return packs.distinctBy { it.packageName }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user