version:1.1.8
fix: update:优化禁用
This commit is contained in:
@@ -20,6 +20,7 @@ import androidx.annotation.RequiresApi;
|
||||
import com.uiui.zyos.BuildConfig;
|
||||
import com.uiui.zyos.R;
|
||||
import com.uiui.zyos.bean.DesktopIcon;
|
||||
import com.uiui.zyos.config.CommonConfig;
|
||||
import com.uiui.zyos.receiver.InstallResultReceiver;
|
||||
|
||||
import java.io.File;
|
||||
@@ -57,13 +58,23 @@ public class ApkUtils {
|
||||
this.add("com.android.uiuios");
|
||||
this.add("com.uiui.os");
|
||||
this.add("com.uiui.health");
|
||||
this.add("com.uiui.appstore");
|
||||
this.add("com.tencent.android.qqdownloader");
|
||||
this.add("com.alldocube.store");
|
||||
this.add("com.joytv.live");
|
||||
this.add("com.iflytek.speechcloud");
|
||||
this.add("com.safe.uiui");
|
||||
this.add("com.uiuios.aios");
|
||||
this.add("com.uiuios.sn");
|
||||
this.add("com.uiuios.appstore");
|
||||
this.add("com.uiuios.browser");
|
||||
this.add("com.uiui.aios");
|
||||
this.add("com.uiui.sn");
|
||||
this.add("com.uiui.appstore");
|
||||
this.add("com.uiui.browser");
|
||||
this.add("com.teclast.zyos");
|
||||
this.add("com.teclast.zy");
|
||||
this.add("com.teclast.zyappstore");
|
||||
this.add("com.teclast.zybrowser");
|
||||
}};
|
||||
|
||||
private static HashSet<String> excludeClassName = new HashSet<String>() {{
|
||||
@@ -96,6 +107,10 @@ public class ApkUtils {
|
||||
private static HashSet<String> allHintPackage = new HashSet<String>() {{
|
||||
this.add("com.android.uiuios");
|
||||
}};
|
||||
|
||||
public static final String ANDROID_LAUNCHER3_PACKAGE_NAME = "com.android.launcher3";
|
||||
public static final String ANDROID_LAUNCHER3_CLASS_NAME = "com.android.launcher3.Launcher";
|
||||
|
||||
private static String TAG = ApkUtils.class.getSimpleName();
|
||||
|
||||
public static ArrayList<ApplicationInfo> getSystemApp(Context context) {
|
||||
@@ -181,7 +196,7 @@ public class ApkUtils {
|
||||
if (!TextUtils.isEmpty(appListString)) {
|
||||
packageList = new ArrayList<>(Arrays.asList(appListString.split(",")));
|
||||
}
|
||||
int setting_other_appInstaller = Settings.Global.getInt(context.getContentResolver(), "setting_other_appInstaller", 1);
|
||||
int setting_other_appInstaller = Settings.Global.getInt(context.getContentResolver(), CommonConfig.SETTING_OTHER_APPINSTALLER_KEY, 1);
|
||||
for (ResolveInfo resolveInfo : resolveinfoList) {
|
||||
String pkg = resolveInfo.activityInfo.packageName;
|
||||
if (appIsDisable(context, pkg)) {
|
||||
@@ -194,15 +209,15 @@ public class ApkUtils {
|
||||
// resolveInfos.add(resolveInfo);
|
||||
// }
|
||||
} else {
|
||||
if (setting_other_appInstaller == 0) {//不显示自己安装的
|
||||
if (packageList.contains(pkg)) {
|
||||
resolveInfos.add(resolveInfo);
|
||||
}
|
||||
} else {
|
||||
// if (setting_other_appInstaller == 0) {//不显示自己安装的
|
||||
// if (packageList.contains(pkg)) {
|
||||
// resolveInfos.add(resolveInfo);
|
||||
// }
|
||||
// } else {
|
||||
if (allowPackages.contains(pkg) && !excludePackageName.contains(pkg)) {
|
||||
resolveInfos.add(resolveInfo);
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
if (Settings.Global.getInt(context.getContentResolver(), "is_activity", 0) == 0) {
|
||||
@@ -558,4 +573,11 @@ public class ApkUtils {
|
||||
public static int getUserId(int uid) {
|
||||
return uid / PER_USER_RANGE;
|
||||
}
|
||||
|
||||
public static void gotoLauncher(Context context) {
|
||||
Intent i = new Intent(Intent.ACTION_MAIN);
|
||||
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //android123提示如果是服务里调用,必须加入new task标识
|
||||
i.addCategory(Intent.CATEGORY_HOME);
|
||||
context.startActivity(i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user