Identify theme supported icon pack by intent (#3116)
* Remove hardcoded Icon pack that supports Themed Icons * Cleanup * Trim space * Moved intent value to xml Moved * Build ThemedMap from old lawnicon packs * fix wrong condition * resync platform module Co-authored-by: Goooler <wangzongler@gmail.com>
This commit is contained in:
1 parent
52659111fc
commit
e61e43952e
9 files changed
+38
-20
No files matched your search
@@ -152,8 +152,14 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
|
||||
if (packages[i].equals(pm.getIconPackPackage().get())) {
|
||||
pm.getIconPackPackage().set("");
|
||||
};
|
||||
if (Arrays.stream(context.getResources().getStringArray(R.array.themed_icon_packs))
|
||||
.noneMatch(it -> packageManagerHelper.isAppInstalled(it, mUser))) {
|
||||
final boolean isThemedIconsAvailable = context.getPackageManager()
|
||||
.queryIntentActivityOptions(
|
||||
new ComponentName(context.getApplicationInfo().packageName, context.getApplicationInfo().className),
|
||||
null,
|
||||
new Intent(context.getResources().getString(R.string.icon_packs_intent_name)),
|
||||
PackageManager.GET_RESOLVED_FILTER).stream().map(it -> it.activityInfo.packageName)
|
||||
.noneMatch(it -> packageManagerHelper.isAppInstalled(it, mUser));
|
||||
if (isThemedIconsAvailable) {
|
||||
pm.getThemedIcons().set(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user