version:2.1 beta

fix:优化获取桌面图标接口
update:
This commit is contained in:
2022-04-26 10:30:01 +08:00
parent 7a1a4fe5a5
commit 5c821df549
4 changed files with 90 additions and 53 deletions

View File

@@ -1381,8 +1381,8 @@ public class JGYUtils {
for (ResolveInfo resolveInfo : apps) {
String pkg = resolveInfo.activityInfo.packageName;
Log.e(TAG, "hideSystemAPP: " + pkg);
if (!ApkUtils.isSystemApp(mContext, pkg)) {
continue;
if (ApkUtils.isSystemApp(mContext, pkg)) {
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
}
if (!showAppList.contains(pkg)) {
pm.setApplicationEnabledSetting(pkg, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
@@ -1898,6 +1898,7 @@ public class JGYUtils {
public void checkDefaultDesktop(String pkg) {
String desktopPkg = (String) SPUtils.get(mContext, "default_launcher", "");
Log.e(TAG, "checkDefaultDesktop: " + desktopPkg);
if (desktopPkg.equalsIgnoreCase(pkg)) {
setDefaultDesktop(pkg);
}