feat: 增加高通平台
This commit is contained in:
@@ -282,6 +282,20 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
QualcommDebug.initWith(debug)
|
||||||
|
QualcommDebug {
|
||||||
|
buildConfigField "String", "platform", '"QualcommA"'
|
||||||
|
versionNameSuffix "-debug"
|
||||||
|
debuggable true
|
||||||
|
signingConfig signingConfigs.zhanRui
|
||||||
|
}
|
||||||
|
|
||||||
|
QualcommRelease.initWith(release)
|
||||||
|
QualcommRelease {
|
||||||
|
buildConfigField "String", "platform", '"QualcommA"'
|
||||||
|
signingConfig signingConfigs.zhanRui
|
||||||
|
}
|
||||||
|
|
||||||
G128TDebug.initWith(debug)
|
G128TDebug.initWith(debug)
|
||||||
G128TDebug {
|
G128TDebug {
|
||||||
buildConfigField "String", "platform", '"G128T"'
|
buildConfigField "String", "platform", '"G128T"'
|
||||||
|
|||||||
@@ -2840,6 +2840,8 @@ public class NetInterfaceManager {
|
|||||||
tagSets.add(JgyUtils.MT6765_TAG);
|
tagSets.add(JgyUtils.MT6765_TAG);
|
||||||
} else if (platform == JgyUtils.G128TPlatform) {
|
} else if (platform == JgyUtils.G128TPlatform) {
|
||||||
tagSets.add(JgyUtils.G128T_TAG);
|
tagSets.add(JgyUtils.G128T_TAG);
|
||||||
|
} else if (platform == JgyUtils.QualcommTPlatform) {
|
||||||
|
tagSets.add(JgyUtils.Qualcomm_TAG);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ public class JgyUtils {
|
|||||||
public static final int U1302Platform = 26;
|
public static final int U1302Platform = 26;
|
||||||
public static final int MT6765Platform = 28;
|
public static final int MT6765Platform = 28;
|
||||||
public static final int G128TPlatform = 29;
|
public static final int G128TPlatform = 29;
|
||||||
|
public static final int QualcommTPlatform = 30;
|
||||||
|
|
||||||
|
|
||||||
public static final String Other = "其他";
|
public static final String Other = "其他";
|
||||||
@@ -198,6 +199,7 @@ public class JgyUtils {
|
|||||||
public static final String allwinner_U1302 = "QZA15";
|
public static final String allwinner_U1302 = "QZA15";
|
||||||
public static final String MT6765_TAG = "MT6765";
|
public static final String MT6765_TAG = "MT6765";
|
||||||
public static final String G128T_TAG = "G128T";
|
public static final String G128T_TAG = "G128T";
|
||||||
|
public static final String Qualcomm_TAG = "QualcommA";
|
||||||
|
|
||||||
|
|
||||||
private CacheHelper cacheHelper;
|
private CacheHelper cacheHelper;
|
||||||
@@ -350,6 +352,9 @@ public class JgyUtils {
|
|||||||
} else if (G128T_TAG.equalsIgnoreCase(platform)) {
|
} else if (G128T_TAG.equalsIgnoreCase(platform)) {
|
||||||
Log.i(TAG, "checkAppPlatform: " + "G128T");
|
Log.i(TAG, "checkAppPlatform: " + "G128T");
|
||||||
return G128TPlatform;
|
return G128TPlatform;
|
||||||
|
} else if (Qualcomm_TAG.equalsIgnoreCase(platform)) {
|
||||||
|
Log.i(TAG, "checkAppPlatform: " + "QualcommA");
|
||||||
|
return QualcommTPlatform;
|
||||||
} else {
|
} else {
|
||||||
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
Log.i(TAG, "checkAppPlatform: " + "没有数据");
|
||||||
return UnknowPlatform;
|
return UnknowPlatform;
|
||||||
@@ -416,6 +421,8 @@ public class JgyUtils {
|
|||||||
getAppPlatformCallback.AppPlatform(MT6765Platform);
|
getAppPlatformCallback.AppPlatform(MT6765Platform);
|
||||||
} else if (G128T_TAG.equalsIgnoreCase(platform)) {
|
} else if (G128T_TAG.equalsIgnoreCase(platform)) {
|
||||||
getAppPlatformCallback.AppPlatform(G128TPlatform);
|
getAppPlatformCallback.AppPlatform(G128TPlatform);
|
||||||
|
} else if (Qualcomm_TAG.equalsIgnoreCase(platform)) {
|
||||||
|
getAppPlatformCallback.AppPlatform(QualcommTPlatform);
|
||||||
} else {
|
} else {
|
||||||
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
getAppPlatformCallback.AppPlatform(UnknowPlatform);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import android.app.StatusBarManager;
|
|||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.cube.SuperPower;
|
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -205,8 +204,12 @@ public class SysSettingUtils {
|
|||||||
if (JgyUtils.isAllWinnerDevice()) {
|
if (JgyUtils.isAllWinnerDevice()) {
|
||||||
AllwinnerCubeMdmManager.getInstance().setUsbStatus(state);
|
AllwinnerCubeMdmManager.getInstance().setUsbStatus(state);
|
||||||
} else {
|
} else {
|
||||||
SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
// try {
|
||||||
mService.setUsbDataDisabled(true);
|
// SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
||||||
|
// mService.setUsbDataDisabled(true);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// Log.e(TAG, "setUsbStatus: " + e.getMessage());
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (state == 0) {
|
if (state == 0) {
|
||||||
@@ -257,15 +260,15 @@ public class SysSettingUtils {
|
|||||||
|
|
||||||
// if (!BuildConfig.DEBUG) {
|
// if (!BuildConfig.DEBUG) {
|
||||||
if (JgyUtils.isCubeDevice()) {
|
if (JgyUtils.isCubeDevice()) {
|
||||||
SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
// SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
||||||
switch (setting_usb) {
|
switch (setting_usb) {
|
||||||
case "usb_mtp":
|
case "usb_mtp":
|
||||||
mService.setUsbDataDisabled(false);
|
// mService.setUsbDataDisabled(false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case "usb_midi":
|
case "usb_midi":
|
||||||
case "usb_charge":
|
case "usb_charge":
|
||||||
mService.setUsbDataDisabled(true);
|
// mService.setUsbDataDisabled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (JgyUtils.isAllWinnerDevice()) {
|
} else if (JgyUtils.isAllWinnerDevice()) {
|
||||||
@@ -1167,16 +1170,16 @@ public class SysSettingUtils {
|
|||||||
//MTP模式:usb_mtp
|
//MTP模式:usb_mtp
|
||||||
//Midi模式:usb_midi
|
//Midi模式:usb_midi
|
||||||
if (JgyUtils.isCubeDevice()) {
|
if (JgyUtils.isCubeDevice()) {
|
||||||
SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
// SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
||||||
switch (status) {
|
// switch (status) {
|
||||||
case 0:
|
// case 0:
|
||||||
mService.setUsbDataDisabled(true);
|
// mService.setUsbDataDisabled(true);
|
||||||
break;
|
// break;
|
||||||
case 1:
|
// case 1:
|
||||||
mService.setUsbDataDisabled(false);
|
// mService.setUsbDataDisabled(false);
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
String usbStatus;
|
String usbStatus;
|
||||||
switch (status) {
|
switch (status) {
|
||||||
|
|||||||
@@ -1837,6 +1837,7 @@ public class Utils {
|
|||||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.U1302Platform
|
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.U1302Platform
|
||||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform
|
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.MT6765Platform
|
||||||
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G128TPlatform
|
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.G128TPlatform
|
||||||
|
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.QualcommTPlatform
|
||||||
) {
|
) {
|
||||||
return Utils.getProperty("ro.build.display.id", "获取失败");
|
return Utils.getProperty("ro.build.display.id", "获取失败");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user