version:6.5.4

fix:
update:增加一百分接口,增加清理界面
This commit is contained in:
2023-11-20 10:38:15 +08:00
parent a7af7cf2a8
commit 1bf394241c
31 changed files with 1161 additions and 835 deletions

View File

@@ -154,6 +154,7 @@ public class SysSettingUtils {
}
//存储卡
int setting_memory = changeNum(jsonObject.get("setting_memory").getAsInt());
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) {
@@ -215,12 +216,15 @@ public class SysSettingUtils {
default:
case "usb_charge":
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_CHARGE;
JGYUtils.getInstance().setMtpEnable(false);
break;
case "usb_mtp":
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MTP;
JGYUtils.getInstance().setMtpEnable(true);
break;
case "usb_midi":
usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MIDI;
JGYUtils.getInstance().setMtpEnable(false);
break;
}
Intent usbIntent = new Intent(usbStatus);
@@ -232,6 +236,7 @@ public class SysSettingUtils {
context.sendBroadcast(usbIntent);
}
}
}
private static void setBluetooth(Context context, int state) {
@@ -295,6 +300,7 @@ public class SysSettingUtils {
//设置关闭时关闭蓝牙
}
}
JGYUtils.getInstance().setBluetoothEnable(setting_bht == 1);
} catch (Exception e) {
Log.e(TAG, "setBluetooth: " + e.getMessage());
}
@@ -401,22 +407,22 @@ public class SysSettingUtils {
int setting_statusbar = changeNum(jsonObject.get("setting_statusbar").getAsInt());
// int oldNum = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, 0);
// if (oldNum != setting_statusbar) {
//写入到系统不涉及任何管控,因为之前调用会频繁隐藏显示
boolean aole_hide_statusBar = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, setting_statusbar);
Log.e(TAG, "aole_hide_statusBar: " + aole_hide_statusBar);
String statusbarStatus = "";
switch (setting_statusbar) {
case 0:
statusbarStatus = CommonConfig.AOLE_ACTION_SHOW_STATUS_BAR;
break;
case 1:
statusbarStatus = CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR;
break;
default:
}
Intent statusIntent = new Intent(statusbarStatus);
//写入到系统不涉及任何管控,因为之前调用会频繁隐藏显示
boolean aole_hide_statusBar = Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR, setting_statusbar);
Log.e(TAG, "aole_hide_statusBar: " + aole_hide_statusBar);
String statusbarStatus = "";
switch (setting_statusbar) {
case 0:
statusbarStatus = CommonConfig.AOLE_ACTION_SHOW_STATUS_BAR;
break;
case 1:
statusbarStatus = CommonConfig.AOLE_ACTION_HIDE_STATUS_BAR;
break;
default:
}
Intent statusIntent = new Intent(statusbarStatus);
// Intent statusIntent = new Intent(statusbarStatus).setPackage("com.android.systemui");
context.sendBroadcast(statusIntent);
context.sendBroadcast(statusIntent);
// }
}
@@ -462,6 +468,7 @@ public class SysSettingUtils {
}
Intent cameraIntent = new Intent(cameraStatus).setPackage("com.android.settings");
context.sendBroadcast(cameraIntent);
JGYUtils.getInstance().setCameraEnable(setting_camera == 1);
} catch (Exception e) {
Log.e(TAG, "setCamera: " + e.getMessage());
}