feat: 增加高通平台

This commit is contained in:
2026-04-10 10:12:42 +08:00
parent b9c5337032
commit 5eb341ca72
5 changed files with 43 additions and 16 deletions

View File

@@ -2840,6 +2840,8 @@ public class NetInterfaceManager {
tagSets.add(JgyUtils.MT6765_TAG);
} else if (platform == JgyUtils.G128TPlatform) {
tagSets.add(JgyUtils.G128T_TAG);
} else if (platform == JgyUtils.QualcommTPlatform) {
tagSets.add(JgyUtils.Qualcomm_TAG);
}
});

View File

@@ -173,6 +173,7 @@ public class JgyUtils {
public static final int U1302Platform = 26;
public static final int MT6765Platform = 28;
public static final int G128TPlatform = 29;
public static final int QualcommTPlatform = 30;
public static final String Other = "其他";
@@ -198,6 +199,7 @@ public class JgyUtils {
public static final String allwinner_U1302 = "QZA15";
public static final String MT6765_TAG = "MT6765";
public static final String G128T_TAG = "G128T";
public static final String Qualcomm_TAG = "QualcommA";
private CacheHelper cacheHelper;
@@ -350,6 +352,9 @@ public class JgyUtils {
} else if (G128T_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "G128T");
return G128TPlatform;
} else if (Qualcomm_TAG.equalsIgnoreCase(platform)) {
Log.i(TAG, "checkAppPlatform: " + "QualcommA");
return QualcommTPlatform;
} else {
Log.i(TAG, "checkAppPlatform: " + "没有数据");
return UnknowPlatform;
@@ -416,6 +421,8 @@ public class JgyUtils {
getAppPlatformCallback.AppPlatform(MT6765Platform);
} else if (G128T_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(G128TPlatform);
} else if (Qualcomm_TAG.equalsIgnoreCase(platform)) {
getAppPlatformCallback.AppPlatform(QualcommTPlatform);
} else {
getAppPlatformCallback.AppPlatform(UnknowPlatform);
}

View File

@@ -5,7 +5,6 @@ import android.app.StatusBarManager;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Intent;
import android.cube.SuperPower;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
@@ -205,8 +204,12 @@ public class SysSettingUtils {
if (JgyUtils.isAllWinnerDevice()) {
AllwinnerCubeMdmManager.getInstance().setUsbStatus(state);
} else {
SuperPower mService = (SuperPower) context.getSystemService("mdm");
mService.setUsbDataDisabled(true);
// try {
// SuperPower mService = (SuperPower) context.getSystemService("mdm");
// mService.setUsbDataDisabled(true);
// } catch (Exception e) {
// Log.e(TAG, "setUsbStatus: " + e.getMessage());
// }
}
} else {
if (state == 0) {
@@ -257,15 +260,15 @@ public class SysSettingUtils {
// if (!BuildConfig.DEBUG) {
if (JgyUtils.isCubeDevice()) {
SuperPower mService = (SuperPower) context.getSystemService("mdm");
// SuperPower mService = (SuperPower) context.getSystemService("mdm");
switch (setting_usb) {
case "usb_mtp":
mService.setUsbDataDisabled(false);
// mService.setUsbDataDisabled(false);
break;
default:
case "usb_midi":
case "usb_charge":
mService.setUsbDataDisabled(true);
// mService.setUsbDataDisabled(true);
break;
}
} else if (JgyUtils.isAllWinnerDevice()) {
@@ -1167,16 +1170,16 @@ public class SysSettingUtils {
//MTP模式usb_mtp
//Midi模式usb_midi
if (JgyUtils.isCubeDevice()) {
SuperPower mService = (SuperPower) context.getSystemService("mdm");
switch (status) {
case 0:
mService.setUsbDataDisabled(true);
break;
case 1:
mService.setUsbDataDisabled(false);
break;
default:
}
// SuperPower mService = (SuperPower) context.getSystemService("mdm");
// switch (status) {
// case 0:
// mService.setUsbDataDisabled(true);
// break;
// case 1:
// mService.setUsbDataDisabled(false);
// break;
// default:
// }
} else {
String usbStatus;
switch (status) {

View File

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