增加酷比mdm,修改推送标签,卸载预装apk,隐藏电子邮件
This commit is contained in:
@@ -61,8 +61,8 @@ android {
|
|||||||
//新平台正式
|
//新平台正式
|
||||||
cube {
|
cube {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 20
|
versionCode 21
|
||||||
versionName "2.9"
|
versionName "3.0"
|
||||||
/*********************************极光推送************************************/
|
/*********************************极光推送************************************/
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
XG_ACCESS_ID : "1500026372",
|
XG_ACCESS_ID : "1500026372",
|
||||||
@@ -233,6 +233,7 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
// implementation fileTree(dir: "libs", include: ["*.jar"])
|
// implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||||
compileOnly files('libs/framework.jar')
|
compileOnly files('libs/framework.jar')
|
||||||
|
compileOnly files('libs/cube_mdm.jar')
|
||||||
|
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
|
|||||||
BIN
app/libs/cube_mdm.jar
Normal file
BIN
app/libs/cube_mdm.jar
Normal file
Binary file not shown.
@@ -630,7 +630,7 @@ public class HTTPInterface {
|
|||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||||
Log.e("getAppLimit", "onNext: " + baseResponse);
|
Log.e("getAppLimit", "onNext: " + baseResponse);
|
||||||
JsonObject jsonObject = JsonParser.parseString(baseResponse.data.toString()).getAsJsonObject();
|
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(baseResponse.data)).getAsJsonObject();
|
||||||
if (baseResponse.code == 200) {
|
if (baseResponse.code == 200) {
|
||||||
String data = jsonObject.get("result").getAsString();
|
String data = jsonObject.get("result").getAsString();
|
||||||
//开机图标 只记录后台传的包名
|
//开机图标 只记录后台传的包名
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ public class GuardService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setDefaultUSBStatus() {
|
private void setDefaultUSBStatus() {
|
||||||
String setting_usb = Settings.System.getString(getContentResolver(), "qch_usb_choose");
|
String setting_usb = Settings.System.getString(getContentResolver(), "aole_usb_choose");
|
||||||
Log.e("setDefaultUSBStatus", "setting_usb---------" + setting_usb);
|
Log.e("setDefaultUSBStatus", "setting_usb---------" + setting_usb);
|
||||||
String usbStatus = "";
|
String usbStatus = "";
|
||||||
if (TextUtils.isEmpty(setting_usb)) {
|
if (TextUtils.isEmpty(setting_usb)) {
|
||||||
@@ -453,7 +453,7 @@ public class GuardService extends Service {
|
|||||||
usbStatus = "aole_action_usb_usb_mtp";
|
usbStatus = "aole_action_usb_usb_mtp";
|
||||||
break;
|
break;
|
||||||
case "usb_midi":
|
case "usb_midi":
|
||||||
usbStatus = "qch_action_usb_usb_midi";
|
usbStatus = "aole_action_usb_usb_midi";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
|
|||||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||||
import okhttp3.ResponseBody;
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
|
import static com.google.gson.JsonParser.parseString;
|
||||||
|
|
||||||
//import static com.aoleyun.sn.jpush.TagAliasOperatorHelper.ACTION_SET;
|
//import static com.aoleyun.sn.jpush.TagAliasOperatorHelper.ACTION_SET;
|
||||||
//import static com.aoleyun.sn.jpush.TagAliasOperatorHelper.sequence;
|
//import static com.aoleyun.sn.jpush.TagAliasOperatorHelper.sequence;
|
||||||
|
|
||||||
@@ -137,7 +139,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e(TAG + ":" + "getLockedState", "onNext: " + JSONObject.toJSONString(response));
|
Log.e(TAG + ":" + "getLockedState", "onNext: " + JSONObject.toJSONString(response));
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
int locked = jsonObject.get("lock").getAsInt();
|
int locked = jsonObject.get("lock").getAsInt();
|
||||||
Log.e(TAG + ":" + "getLockedState", "locked: " + locked);
|
Log.e(TAG + ":" + "getLockedState", "locked: " + locked);
|
||||||
int oldState = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
|
int oldState = Settings.System.getInt(mContext.getContentResolver(), JGYActions.ACTION_QCH_UNLOCK_IPAD, 0);
|
||||||
@@ -191,7 +193,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
public void onNext(@NonNull BaseResponse response) {
|
public void onNext(@NonNull BaseResponse response) {
|
||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
String batch = jsonObject.get("batch").getAsString();
|
String batch = jsonObject.get("batch").getAsString();
|
||||||
Log.e(TAG + ":" + "setPushTags", "onNext: " + batch);
|
Log.e(TAG + ":" + "setPushTags", "onNext: " + batch);
|
||||||
if (!TextUtils.isEmpty(batch)) {
|
if (!TextUtils.isEmpty(batch)) {
|
||||||
@@ -477,7 +479,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e("checkInfoUpdate", "onNext: " + response.data);
|
Log.e("checkInfoUpdate", "onNext: " + response.data);
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
JGYUtils.getInstance().installAPK(jsonObject);
|
JGYUtils.getInstance().installAPK(jsonObject);
|
||||||
} else {
|
} else {
|
||||||
Log.e("checkInfoUpdate", "onNext: " + response);
|
Log.e("checkInfoUpdate", "onNext: " + response);
|
||||||
@@ -518,7 +520,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e(TAG + ":" + "checkUpdateStore", "onNext: " + response.data);
|
Log.e(TAG + ":" + "checkUpdateStore", "onNext: " + response.data);
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
JGYUtils.getInstance().installAPK(jsonObject);
|
JGYUtils.getInstance().installAPK(jsonObject);
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG + ":" + "checkUpdateStore", "onNext: " + response);
|
Log.e(TAG + ":" + "checkUpdateStore", "onNext: " + response);
|
||||||
@@ -561,7 +563,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e("checkDesktopUpdate", "onNext: " + response.data);
|
Log.e("checkDesktopUpdate", "onNext: " + response.data);
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
JGYUtils.getInstance().installAPK(jsonObject);
|
JGYUtils.getInstance().installAPK(jsonObject);
|
||||||
} else {
|
} else {
|
||||||
Log.e("checkDesktopUpdate", "onNext: " + response);
|
Log.e("checkDesktopUpdate", "onNext: " + response);
|
||||||
@@ -602,7 +604,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e("checkNotifyUpdate", "onNext: " + response.data);
|
Log.e("checkNotifyUpdate", "onNext: " + response.data);
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
JGYUtils.getInstance().installAPK(jsonObject);
|
JGYUtils.getInstance().installAPK(jsonObject);
|
||||||
} else {
|
} else {
|
||||||
Log.e("checkNotifyUpdate", "onNext: " + response);
|
Log.e("checkNotifyUpdate", "onNext: " + response);
|
||||||
@@ -643,7 +645,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e("checkBrowserUpdate", "onNext: " + response.data);
|
Log.e("checkBrowserUpdate", "onNext: " + response.data);
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
JGYUtils.getInstance().installAPK(jsonObject);
|
JGYUtils.getInstance().installAPK(jsonObject);
|
||||||
} else {
|
} else {
|
||||||
Log.e("checkBrowserUpdate", "onNext: " + response);
|
Log.e("checkBrowserUpdate", "onNext: " + response);
|
||||||
@@ -939,7 +941,8 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e(TAG + ":" + "getAppLimit", "onNext: " + baseResponse);
|
Log.e(TAG + ":" + "getAppLimit", "onNext: " + baseResponse);
|
||||||
JsonObject jsonObject = JsonParser.parseString(baseResponse.data.toString()).getAsJsonObject();
|
Log.e(TAG + ":" + "getAppLimit", "onNext: " + baseResponse.data.toString());
|
||||||
|
JsonObject jsonObject = parseString(new Gson().toJson(baseResponse.data)).getAsJsonObject();
|
||||||
if (baseResponse.code == OK) {
|
if (baseResponse.code == OK) {
|
||||||
String data = jsonObject.get("result").getAsString();
|
String data = jsonObject.get("result").getAsString();
|
||||||
//开机图标
|
//开机图标
|
||||||
@@ -992,7 +995,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
requestSucceeded = true;
|
requestSucceeded = true;
|
||||||
Log.e(TAG + ":" + "getROMApp", "onNext: " + baseResponse);
|
Log.e(TAG + ":" + "getROMApp", "onNext: " + baseResponse);
|
||||||
if (baseResponse.code == OK) {
|
if (baseResponse.code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(baseResponse.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(baseResponse.data)).getAsJsonObject();
|
||||||
String packageName = jsonObject.get("package_name").getAsString();
|
String packageName = jsonObject.get("package_name").getAsString();
|
||||||
Settings.System.putString(mContext.getContentResolver(), "jgy_customromapp", packageName);
|
Settings.System.putString(mContext.getContentResolver(), "jgy_customromapp", packageName);
|
||||||
} else {
|
} else {
|
||||||
@@ -1170,7 +1173,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
try {
|
try {
|
||||||
String bodyString = responseBody.string();
|
String bodyString = responseBody.string();
|
||||||
Log.e(TAG + ":" + "getAppIDControl", "bodyString: " + bodyString);
|
Log.e(TAG + ":" + "getAppIDControl", "bodyString: " + bodyString);
|
||||||
JsonObject jsonObject = JsonParser.parseString(bodyString).getAsJsonObject();
|
JsonObject jsonObject = parseString(bodyString).getAsJsonObject();
|
||||||
int code = jsonObject.get("code").getAsInt();
|
int code = jsonObject.get("code").getAsInt();
|
||||||
if (code == OK) {
|
if (code == OK) {
|
||||||
JsonObject data = jsonObject.getAsJsonObject("data");
|
JsonObject data = jsonObject.getAsJsonObject("data");
|
||||||
@@ -1238,7 +1241,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
try {
|
try {
|
||||||
String bodyString = responseBody.string();
|
String bodyString = responseBody.string();
|
||||||
Log.e(TAG + ":" + "setSystemSetting", "onNext: " + bodyString);
|
Log.e(TAG + ":" + "setSystemSetting", "onNext: " + bodyString);
|
||||||
JsonObject jsonObject = JsonParser.parseString(bodyString).getAsJsonObject();
|
JsonObject jsonObject = parseString(bodyString).getAsJsonObject();
|
||||||
int code = jsonObject.get("code").getAsInt();
|
int code = jsonObject.get("code").getAsInt();
|
||||||
if (code == OK) {
|
if (code == OK) {
|
||||||
String data = jsonObject.getAsJsonObject("data").toString();
|
String data = jsonObject.getAsJsonObject("data").toString();
|
||||||
@@ -1475,7 +1478,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
Log.e(TAG + ":" + "getEBagCode", "onNext: " + baseResponse);
|
Log.e(TAG + ":" + "getEBagCode", "onNext: " + baseResponse);
|
||||||
int code = baseResponse.code;
|
int code = baseResponse.code;
|
||||||
if (code == OK) {
|
if (code == OK) {
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(baseResponse.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(baseResponse.data)).getAsJsonObject();
|
||||||
String ebagCode = jsonObject.get("ebagCode").getAsString();
|
String ebagCode = jsonObject.get("ebagCode").getAsString();
|
||||||
SPUtils.put(mContext, "ebagCode", ebagCode);
|
SPUtils.put(mContext, "ebagCode", ebagCode);
|
||||||
} else {
|
} else {
|
||||||
@@ -1512,7 +1515,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
Log.e("getWiFiPasswd", "onNext: ");
|
Log.e("getWiFiPasswd", "onNext: ");
|
||||||
if (listBaseResponse.code == OK) {
|
if (listBaseResponse.code == OK) {
|
||||||
WiFiUtils.saveWiFiPasswd(listBaseResponse.data);
|
WiFiUtils.saveWiFiPasswd(listBaseResponse.data);
|
||||||
mMMKV.encode("WiFiPassword", JsonParser.parseString(new Gson().toJson(listBaseResponse.data)).toString());
|
mMMKV.encode("WiFiPassword", parseString(new Gson().toJson(listBaseResponse.data)).toString());
|
||||||
} else {
|
} else {
|
||||||
Log.e("getWiFiPasswd", "onNext: msg = " + listBaseResponse.msg);
|
Log.e("getWiFiPasswd", "onNext: msg = " + listBaseResponse.msg);
|
||||||
WiFiUtils.saveWiFiPasswd(listBaseResponse.data);
|
WiFiUtils.saveWiFiPasswd(listBaseResponse.data);
|
||||||
@@ -1564,7 +1567,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
Log.e(TAG + ":" + "getScreenLockState", "onNext: ");
|
Log.e(TAG + ":" + "getScreenLockState", "onNext: ");
|
||||||
if (response.code == OK) {
|
if (response.code == OK) {
|
||||||
String bodyString = response.data.toString();
|
String bodyString = response.data.toString();
|
||||||
JsonObject jsonObject = JsonParser.parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
JsonObject jsonObject = parseString(new Gson().toJson(response.data)).getAsJsonObject();
|
||||||
int is_screen_lock = jsonObject.get("is_screen_lock").getAsInt();
|
int is_screen_lock = jsonObject.get("is_screen_lock").getAsInt();
|
||||||
String name = jsonObject.get("name").getAsString();
|
String name = jsonObject.get("name").getAsString();
|
||||||
mView.setScreenLockStateFinish(is_screen_lock == 1, name);
|
mView.setScreenLockStateFinish(is_screen_lock == 1, name);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import android.content.BroadcastReceiver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.PixelFormat;
|
import android.graphics.PixelFormat;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
@@ -244,6 +245,10 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
Log.e(TAG, "onCreate: ");
|
Log.e(TAG, "onCreate: ");
|
||||||
|
ApkUtils.UninstallAPP(this, "com.joytv.live");
|
||||||
|
ApkUtils.UninstallAPP(this, "com.tencent.android.qqdownloader");
|
||||||
|
getPackageManager().setApplicationEnabledSetting("com.android.email", PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
|
||||||
|
|
||||||
lifecycleSubject.onNext(ActivityEvent.CREATE);
|
lifecycleSubject.onNext(ActivityEvent.CREATE);
|
||||||
mPresenter = new MainSPresenter(this);
|
mPresenter = new MainSPresenter(this);
|
||||||
mPresenter.attachView(this);
|
mPresenter.attachView(this);
|
||||||
|
|||||||
@@ -696,7 +696,7 @@ public class ApkUtils {
|
|||||||
this.add("com.android.calendar");
|
this.add("com.android.calendar");
|
||||||
this.add("com.android.dreams.basic");
|
this.add("com.android.dreams.basic");
|
||||||
this.add("com.android.musicfx");
|
this.add("com.android.musicfx");
|
||||||
this.add("com.android.email");
|
// this.add("com.android.email");
|
||||||
this.add("com.jiaoguanyi.sysc");
|
this.add("com.jiaoguanyi.sysc");
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class JGYUtils {
|
|||||||
public static int ZhanruiPlatform = 2;
|
public static int ZhanruiPlatform = 2;
|
||||||
public static int UnknowPlatform = 0;
|
public static int UnknowPlatform = 0;
|
||||||
public static String MTKTag = "MTK";
|
public static String MTKTag = "MTK";
|
||||||
public static String ZhanruiTag = "展锐";
|
public static String ZhanruiTag = "展锐cube";
|
||||||
public static String Other = "其他";
|
public static String Other = "其他";
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import android.app.StatusBarManager;
|
|||||||
import android.bluetooth.BluetoothAdapter;
|
import android.bluetooth.BluetoothAdapter;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.mdm.SuperPower;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -171,9 +172,11 @@ public class SysSettingUtils {
|
|||||||
//MTP模式:usb_mtp
|
//MTP模式:usb_mtp
|
||||||
//Midi模式:usb_midi
|
//Midi模式:usb_midi
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
|
SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
||||||
try {
|
try {
|
||||||
boolean qch_usb_choose = Settings.System.putString(context.getContentResolver(), "qch_usb_choose", "usb_charge");
|
mService.setUSBDataDisabled(true);
|
||||||
Log.e(TAG, "qch_usb_choose:" + qch_usb_choose);
|
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";
|
String usbStatus = "aole_action_usb_usb_charge";
|
||||||
Intent usbIntent = new Intent(usbStatus).setPackage("com.android.settings");
|
Intent usbIntent = new Intent(usbStatus).setPackage("com.android.settings");
|
||||||
context.sendBroadcast(usbIntent);
|
context.sendBroadcast(usbIntent);
|
||||||
@@ -190,19 +193,22 @@ public class SysSettingUtils {
|
|||||||
//Midi模式:usb_midi
|
//Midi模式:usb_midi
|
||||||
String setting_usb = jsonObject.getString("setting_usb");
|
String setting_usb = jsonObject.getString("setting_usb");
|
||||||
if (!BuildConfig.DEBUG) {
|
if (!BuildConfig.DEBUG) {
|
||||||
|
SuperPower mService = (SuperPower) context.getSystemService("mdm");
|
||||||
try {
|
try {
|
||||||
boolean qch_usb_choose = Settings.System.putString(context.getContentResolver(), "qch_usb_choose", setting_usb);
|
boolean aole_usb_choose = Settings.System.putString(context.getContentResolver(), "aole_usb_choose", setting_usb);
|
||||||
Log.e(TAG, "qch_usb_choose---------" + qch_usb_choose);
|
Log.e("setUSBstate", "aole_usb_choose---------" + aole_usb_choose);
|
||||||
String usbStatus = "";
|
String usbStatus = "";
|
||||||
switch (setting_usb) {
|
switch (setting_usb) {
|
||||||
case "usb_charge":
|
case "usb_charge":
|
||||||
|
mService.setUSBDataDisabled(true);
|
||||||
usbStatus = "aole_action_usb_usb_charge";
|
usbStatus = "aole_action_usb_usb_charge";
|
||||||
break;
|
break;
|
||||||
case "usb_mtp":
|
case "usb_mtp":
|
||||||
|
mService.setUSBDataDisabled(false);
|
||||||
usbStatus = "aole_action_usb_usb_mtp";
|
usbStatus = "aole_action_usb_usb_mtp";
|
||||||
break;
|
break;
|
||||||
case "usb_midi":
|
case "usb_midi":
|
||||||
usbStatus = "qch_action_usb_usb_midi";
|
usbStatus = "aole_action_usb_usb_midi";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ public class Utils {
|
|||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Log.e("e", "读取设备序列号异常:" + e.toString());
|
Log.e("getSerial", "读取设备序列号异常:" + e.toString());
|
||||||
}
|
}
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// return "QNG2DKB00463";
|
// return "QNG2DKB00463";
|
||||||
|
|||||||
Reference in New Issue
Block a user