1.4.0515 修改c2上蓝牙问题

This commit is contained in:
2024-05-15 15:46:07 +08:00
parent 58c36173fd
commit 367832516f
5 changed files with 19 additions and 51 deletions

View File

@@ -410,6 +410,7 @@ public class ApkUtils {
this.add("com.shoufei.aole");
this.add("com.ygyb.yischool");
this.add("com.gaomuxuexi34");
}};

View File

@@ -2022,6 +2022,7 @@ public class JGYUtils {
public void openOTA() {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
/*知道要跳转应用的包命与目标Activity*/
ComponentName componentName = new ComponentName("com.adups.fota", "com.adups.fota.GoogleOtaClient");
intent.setComponent(componentName);

View File

@@ -77,10 +77,12 @@ public class SysSettingUtils {
Log.e("setDisableSetting", "Close all settings: ");
setPhoneList(context, 1);
setUSBstate(context, 1);
if (JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.YXPD1TAG)) {
setBluetooth(context, 1);
} else {
if (JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.YXPD1TAG)
|| JGYUtils.getInstance().getAppPlatform().equals(JGYUtils.C2Tag)
) {
setBluetooth(context, 0);
} else {
setBluetooth(context, 1);
}
setHotspot(context, 1);
setBar(context, 1);
@@ -324,7 +326,7 @@ public class SysSettingUtils {
Log.e(TAG, "setBluetooth: setting_bhtvideo no changed");
}
JGYUtils.getInstance().setBluetoothEnable(state == 1);
JGYUtils.getInstance().setBluetoothEnable(state == 0);
}
/**
@@ -367,13 +369,15 @@ public class SysSettingUtils {
if (old_setting_bhtvideo != setting_bhtvideo) {
mmkv.encode(CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, setting_bhtvideo);
String setting_context = jsonObject.get("setting_context").getAsString();
if (setting_bhtvideo == 0) {
if (null != setting_context && !"".equals(setting_context) && !" ".equals(setting_context) && !"null".equals(setting_context)) {
Log.e(TAG, "setting_context:" + setting_context);
Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, setting_context);
} else {
Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, "Empty");
if (jsonObject.get("setting_context").isJsonNull()) {
String setting_context = jsonObject.get("setting_context").getAsString();
if (null != setting_context && !"".equals(setting_context) && !" ".equals(setting_context) && !"null".equals(setting_context)) {
Log.e(TAG, "setting_context:" + setting_context);
Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, setting_context);
} else {
Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, "Empty");
}
}
} else if (setting_bhtvideo == 1) {
Settings.System.putString(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHTVIDEO_FORBID_ON, "Empty");
@@ -382,7 +386,7 @@ public class SysSettingUtils {
Log.e(TAG, "setBluetooth: setting_bhtvideo no changed");
}
JGYUtils.getInstance().setBluetoothEnable(setting_bht == 1);
JGYUtils.getInstance().setBluetoothEnable(setting_bht == 0);
}
private static void setHotspot(Context context, int state) {