修改usb
This commit is contained in:
@@ -885,26 +885,7 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
||||
if (!TextUtils.isEmpty(jsonString)) {
|
||||
JsonObject jsonObject = GsonUtils.getJsonObject(jsonString);
|
||||
String setting_usb = jsonObject.get("setting_usb").getAsString();
|
||||
ControlPanelManager.getInstance().setUsbStatus(setting_usb);
|
||||
// boolean qch_usb_choose = JGYUtils.putString(context.getContentResolver(), "qch_usb_choose", setting_usb);
|
||||
// Log.e("setUsbState:", JGYUtils.get(context.getContentResolver(), "qch_usb_choose"));
|
||||
// String usbStatus = "";
|
||||
// switch (setting_usb) {
|
||||
// case "usb_charge":
|
||||
// usbStatus = AOLE_ACTION_USB_USB_CHARGE;
|
||||
// break;
|
||||
// case "usb_mtp":
|
||||
// usbStatus = AOLE_ACTION_USB_USB_MTP;
|
||||
// break;
|
||||
//// case "usb_midi":
|
||||
//// usbStatus = CommonConfig.AOLE_ACTION_USB_USB_MIDI;
|
||||
//// break;
|
||||
// default:
|
||||
// usbStatus = AOLE_ACTION_USB_USB_CHARGE;
|
||||
// break;
|
||||
// }
|
||||
// Intent usbIntent = new Intent(usbStatus).setPackage("com.android.settings");
|
||||
// context.sendBroadcast(usbIntent);
|
||||
ControlManager.getInstance().setUSBstate(setting_usb);
|
||||
} else {
|
||||
ToastUtil.debugShow("setUsbState jsonString is NULL");
|
||||
}
|
||||
@@ -1566,9 +1547,9 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
||||
private void oneKeyNetwork(Context context, String extras) {
|
||||
JsonObject jsonObject = GsonUtils.getJsonObject(extras);
|
||||
int is_network = jsonObject.get("is_network").getAsInt();
|
||||
if (is_network==1){
|
||||
if (is_network == 1) {
|
||||
JGYUtils.getInstance().oneKeyDisconnection();
|
||||
}else {
|
||||
} else {
|
||||
JGYUtils.getInstance().restorrNetwork();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user