bugfixes:优化命名
This commit is contained in:
2025-03-13 10:41:32 +08:00
parent 816753a500
commit 8716bf0e36
25 changed files with 458 additions and 397 deletions

View File

@@ -82,8 +82,8 @@ public class SysSettingUtils {
Log.e("setDisableSetting", "Close all settings: ");
setPhoneList(context, 1);
setUSBstate(context, 1);
if (JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.YXPD1TAG)
|| JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.C2Tag)
if (JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.YXPD1TAG)
|| JgyUtils.getInstance().getAppPlatform().equals(JgyUtils.C2Tag)
) {
setBluetooth(context, 0);
} else {
@@ -99,7 +99,7 @@ public class SysSettingUtils {
setAutoTime(context, 1);
setBrowserInput(context, 1);
if (!BuildConfig.DEBUG) {
// JGYUtils.getInstance().setDeveloperOptions(0);
// JgyUtils.getInstance().setDeveloperOptions(0);
}
setStatusBar(context, 1);
setAdminApp(context, 1);
@@ -113,7 +113,7 @@ public class SysSettingUtils {
public static void setEnableSetting(Context context) {
Toaster.debugShow("打开所有功能");
setPhoneList(context, 0);
if (JGYUtils.C2Tag.equalsIgnoreCase(JGYUtils.getInstance().getAppPlatform())) {
if (JgyUtils.C2Tag.equalsIgnoreCase(JgyUtils.getInstance().getAppPlatform())) {
openMtp(context);
}
// setUSBstate(context, 0);
@@ -127,7 +127,7 @@ public class SysSettingUtils {
setCanReset(context, 0);
setAutoTime(context, 0);
setBrowserInput(context, 0);
// JGYUtils.getInstance().setDeveloperOptions(1);
// JgyUtils.getInstance().setDeveloperOptions(1);
setStatusBar(context, 0);
setAdminApp(context, 0);
setSystemAppDisable(context, 0);
@@ -184,7 +184,7 @@ public class SysSettingUtils {
}
//存储卡
int setting_memory = changeNum(jsonObject.get("setting_memory").getAsInt());
JGYUtils.getInstance().setSDOTGEnable(setting_memory == 0);
JgyUtils.getInstance().setSDOTGEnable(setting_memory == 0);
boolean aole_sdcard_forbid_on = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, setting_memory);
Log.e(TAG, "aole_sdcard_forbid_on:" + aole_sdcard_forbid_on);
} catch (Exception e) {
@@ -207,12 +207,12 @@ public class SysSettingUtils {
boolean aole_usb_choose = Settings.System.putString(context.getContentResolver(), "aole_usb_choose", "usb_charge");
Log.e(TAG, "aole_usb_choose:" + aole_usb_choose);
String usbStatus = CommonConfig.AOLE_ACTION_USB_USB_CHARGE;
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AH6016Platform) {
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform) {
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MTP;
}
Intent usbIntent = new Intent(usbStatus);
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AH6016Platform
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -238,7 +238,7 @@ public class SysSettingUtils {
return;
}
if (!BuildConfig.DEBUG) {
if (JGYUtils.isCubeDevice()) {
if (JgyUtils.isCubeDevice()) {
SuperPower mService = (SuperPower) context.getSystemService("mdm");
switch (setting_usb) {
case "usb_charge":
@@ -257,20 +257,20 @@ public class SysSettingUtils {
default:
case "usb_charge":
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_CHARGE;
JGYUtils.getInstance().setMtpEnable(false);
JgyUtils.getInstance().setMtpEnable(false);
break;
case "usb_mtp":
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MTP;
JGYUtils.getInstance().setMtpEnable(true);
JgyUtils.getInstance().setMtpEnable(true);
break;
case "usb_midi":
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MIDI;
JGYUtils.getInstance().setMtpEnable(false);
JgyUtils.getInstance().setMtpEnable(false);
break;
}
Intent usbIntent = new Intent(usbStatus);
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AH6016Platform
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
) {
usbIntent.setPackage("com.android.settings");
}
@@ -331,7 +331,7 @@ public class SysSettingUtils {
Log.e(TAG, "setBluetooth: setting_bhtvideo no changed");
}
JGYUtils.getInstance().setBluetoothEnable(state == 0);
JgyUtils.getInstance().setBluetoothEnable(state == 0);
}
/**
@@ -434,7 +434,7 @@ public class SysSettingUtils {
Log.e(TAG, "setBluetooth: setting_bhtvideo no changed");
}
JGYUtils.getInstance().setBluetoothEnable(setting_bht == 0);
JgyUtils.getInstance().setBluetoothEnable(setting_bht == 0);
}
private static void setHotspot(Context context, int state) {
@@ -601,7 +601,7 @@ public class SysSettingUtils {
}
Intent cameraIntent = new Intent(cameraStatus).setPackage("com.android.settings");
context.sendBroadcast(cameraIntent);
JGYUtils.getInstance().setCameraEnable(setting_camera == 1);
JgyUtils.getInstance().setCameraEnable(setting_camera == 1);
} catch (Exception e) {
Log.e(TAG, "setCamera: " + e.getMessage());
}
@@ -642,7 +642,7 @@ public class SysSettingUtils {
private static void setTF(Context context, JsonObject jsonObject) {
try {
int setting_tfmedia = jsonObject.get("setting_tfmedia").getAsInt();
// if (JGYUtils.isOfficialVersion() ) {
// if (JgyUtils.isOfficialVersion() ) {
// setting_tfmedia = changeNum(setting_tfmedia);
// }
boolean qch_tfmedia_forbid = Settings.System.putInt(context.getContentResolver(),
@@ -996,7 +996,7 @@ public class SysSettingUtils {
int is_bluetooth_file = snSetting.getIs_bluetooth_file();
setBluetoothTransmission(context, changeNum(is_bluetooth_file));
int is_developer = snSetting.getIs_developer();
JGYUtils.getInstance().setDeveloperOptions(is_developer);
JgyUtils.getInstance().setDeveloperOptions(is_developer);
int is_restore = snSetting.getIs_restore();
setCanReset(context, changeNum(is_restore));
int is_topbar = snSetting.getIs_topbar();
@@ -1015,7 +1015,7 @@ public class SysSettingUtils {
// Settings.Global.putInt(context.getContentResolver(), CommonConfig.AOLEYUN_APPSTORE_INSTALL, 1);
// setUsb(context, 0);
// setBluetoothTransmission(context, 0);
//// JGYUtils.getInstance().setDeveloperOptions(0);
//// JgyUtils.getInstance().setDeveloperOptions(0);
// setCanReset(context, 0);
// setActionBar(context, 0);
// setNavigationBar(context, 0);
@@ -1080,7 +1080,7 @@ public class SysSettingUtils {
//仅充电usb_charge
//MTP模式usb_mtp
//Midi模式usb_midi
if (JGYUtils.isCubeDevice()) {
if (JgyUtils.isCubeDevice()) {
SuperPower mService = (SuperPower) context.getSystemService("mdm");
switch (status) {
case 0:
@@ -1097,20 +1097,20 @@ public class SysSettingUtils {
default:
case 0:
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_CHARGE;
JGYUtils.getInstance().setMtpEnable(false);
JgyUtils.getInstance().setMtpEnable(false);
break;
case 1:
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MTP;
JGYUtils.getInstance().setMtpEnable(true);
JgyUtils.getInstance().setMtpEnable(true);
break;
case 2:
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MIDI;
JGYUtils.getInstance().setMtpEnable(false);
JgyUtils.getInstance().setMtpEnable(false);
break;
}
Intent usbIntent = new Intent(usbStatus);
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.TeclastP20sPlatform
|| JGYUtils.getInstance().checkAppPlatform() == JGYUtils.AH6016Platform
if (JgyUtils.getInstance().checkAppPlatform() == JgyUtils.TeclastP20sPlatform
|| JgyUtils.getInstance().checkAppPlatform() == JgyUtils.AH6016Platform
) {
usbIntent.setPackage("com.android.settings");
}