version:3.3
fix:修复几个闪退问题,升级后清除桌面数据 update:时钟,摄像头允许打开,日历app允许显示
This commit is contained in:
@@ -172,15 +172,15 @@ public class SysSettingUtils {
|
||||
//MTP模式:usb_mtp
|
||||
//Midi模式:usb_midi
|
||||
if (!BuildConfig.DEBUG) {
|
||||
SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
||||
try {
|
||||
SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
||||
mService.setUSBDataDisabled(true);
|
||||
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 = "aole_action_usb_usb_charge";
|
||||
Intent usbIntent = new Intent(usbStatus).setPackage("com.android.settings");
|
||||
context.sendBroadcast(usbIntent);
|
||||
} catch (Exception e) {
|
||||
} catch (NoClassDefFoundError | Exception e) {
|
||||
Log.e(TAG, "setUSBstate: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public class SysSettingUtils {
|
||||
//蓝牙总开关开启
|
||||
String setting_context = jsonObject.getString("setting_context");
|
||||
if (setting_bhtvideo == 0) {
|
||||
if (null != setting_context && !setting_context.equals("") && !setting_context.equals(" ") && !setting_context.equals("null")) {
|
||||
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(), "qch_bhtvideo_forbid_on", setting_context);
|
||||
} else {
|
||||
@@ -402,7 +402,7 @@ public class SysSettingUtils {
|
||||
private static void setCamera(Context context, int state) {
|
||||
try {
|
||||
//摄像头开关
|
||||
boolean qch_app_camera = Settings.System.putInt(context.getContentResolver(), "qch_app_camera", state);
|
||||
boolean qch_app_camera = Settings.System.putInt(context.getContentResolver(), "qch_app_camera", 0);
|
||||
Log.e(TAG, "qch_app_camera1:" + state);
|
||||
// ApkUtils.hideSystemSettingAPP(context, "com.mediatek.camera");
|
||||
Log.e(TAG, "setting_camera---------" + qch_app_camera);
|
||||
@@ -522,11 +522,10 @@ public class SysSettingUtils {
|
||||
|
||||
private static void setIcon(Context context, int state) {
|
||||
try {
|
||||
//added:2019.12.6
|
||||
//设置5个app的开关
|
||||
//时钟
|
||||
// int deskclock = 1;
|
||||
Settings.System.putInt(context.getContentResolver(), "qch_app_deskclock", state);
|
||||
Settings.System.putInt(context.getContentResolver(), "qch_app_deskclock", 0);
|
||||
ApkUtils.hideSystemSettingAPP(context, "com.android.deskclock");
|
||||
Log.e(TAG, "qch_app_deskclock" + state);
|
||||
//录音机
|
||||
|
||||
Reference in New Issue
Block a user