refactor: 移除 MX11 平台独立标识并改用设备型号判断

This commit is contained in:
2026-09-15 09:24:54 +08:00
parent 6dd28748ab
commit 8e5a620764
7 changed files with 20 additions and 36 deletions

View File

@@ -2978,11 +2978,12 @@ public class NetInterfaceManager {
private void setForceInstall(List<String> forceApp) {
Set<String> forceAppSet = new HashSet<>();
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
if (JgyUtils.DX11_TAG.equals(Build.MODEL)) {
forceAppSet.addAll(ApkUtils.DX11App);
}
if ("MX11".equals(Build.MODEL)) {
forceAppSet.addAll(ApkUtils.MX11App);
}
if (forceApp != null) {
forceAppSet.addAll(forceApp);
}

View File

@@ -804,7 +804,6 @@ public class GuardService extends Service {
Intent usbIntent = new Intent(usbStatus);
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}

View File

@@ -555,7 +555,9 @@ public class ApkUtils {
this.add("com.example.abc_qq_app");
this.add("com.yangcong345.onionschool");
this.add("com.yangcong345.zhike");
}};
public static final Set<String> MX11App = new HashSet<String>() {{
this.add("com.aidouxue.question_survivors");
this.add("com.aidouxue.learning.yinji");
}};

View File

@@ -178,7 +178,6 @@ public class JgyUtils {
public static final int QualcommTPlatform = 30;
public static final int DX11Platform = 31;
public static final int G12NLPlatform = 32;
public static final int MX11Platform = 33;
public static final String Other = "其他";
@@ -207,7 +206,6 @@ public class JgyUtils {
public static final String Qualcomm_TAG = "QualcommA";
public static final String DX11_TAG = "DX11";
public static final String G12NL_TAG = "G12NL";
public static final String MX11_TAG = "MX11";
private CacheHelper cacheHelper;
@@ -373,9 +371,6 @@ public class JgyUtils {
} else if (DX11_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "DX11");
return DX11Platform;
} else if (MX11_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "MX11");
return MX11Platform;
} else {
Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform;
@@ -448,8 +443,6 @@ public class JgyUtils {
getAppPlatformCallback.AppPlatform(G12NLPlatform);
} else if (DX11_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(DX11Platform);
} else if (MX11_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(MX11Platform);
} else {
getAppPlatformCallback.AppPlatform(UnknowPlatform);
}
@@ -1473,6 +1466,8 @@ public class JgyUtils {
this.add("com.eduyun.app.factory.ykt");
this.add("com.yaerxing.fkst");
this.add("com.jxw.usagedate");
this.add("com.xwad.os");
this.add("com.yiqizuoye.box.launcher");
}};
private Set<String> getWhitePkgList() {
@@ -1501,10 +1496,12 @@ public class JgyUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G11Platform) {
pkgSet.addAll(ApkUtils.G11Pkgs);
}
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform) {
if (JgyUtils.DX11_TAG.equals(Build.MODEL)) {
pkgSet.addAll(ApkUtils.DX11App);
}
if ("MX11".equals(Build.MODEL)) {
pkgSet.addAll(ApkUtils.MX11App);
}
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.YXPD1Platform) {
pkgSet.add("com.tencent.wemeet.app");
}
@@ -1849,12 +1846,16 @@ public class JgyUtils {
if (ApkUtils.mJxwApp.contains(packageName)) {
continue;
}
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform) {
if (JgyUtils.DX11_TAG.equals(Build.MODEL)) {
if (ApkUtils.DX11App.contains(packageName)) {
continue;
}
}
if ("MX11".equals(Build.MODEL)) {
if (ApkUtils.MX11App.contains(packageName)) {
continue;
}
}
if (PackageNames.DEVICE_INFO.equals(packageName) || PackageNames.APPSTORE.equals(packageName)
) {
continue;

View File

@@ -150,7 +150,6 @@ public class SysSettingUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -255,7 +254,6 @@ public class SysSettingUtils {
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.seewoPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -326,7 +324,6 @@ public class SysSettingUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -1242,7 +1239,6 @@ public class SysSettingUtils {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
usbIntent.setPackage("com.android.settings");
}

View File

@@ -1848,7 +1848,6 @@ public class Utils {
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.QualcommTPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.DX11Platform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G12NLPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MX11Platform
) {
return Utils.getProperty("ro.build.display.id", "获取失败");
} else {