增加酷比mdm,修改推送标签,卸载预装apk,隐藏电子邮件
This commit is contained in:
@@ -439,7 +439,7 @@ public class GuardService extends Service {
|
||||
}
|
||||
|
||||
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);
|
||||
String usbStatus = "";
|
||||
if (TextUtils.isEmpty(setting_usb)) {
|
||||
@@ -453,7 +453,7 @@ public class GuardService extends Service {
|
||||
usbStatus = "aole_action_usb_usb_mtp";
|
||||
break;
|
||||
case "usb_midi":
|
||||
usbStatus = "qch_action_usb_usb_midi";
|
||||
usbStatus = "aole_action_usb_usb_midi";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -61,6 +61,8 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
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.sequence;
|
||||
|
||||
@@ -137,7 +139,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
requestSucceeded = true;
|
||||
Log.e(TAG + ":" + "getLockedState", "onNext: " + JSONObject.toJSONString(response));
|
||||
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();
|
||||
Log.e(TAG + ":" + "getLockedState", "locked: " + locked);
|
||||
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) {
|
||||
requestSucceeded = true;
|
||||
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();
|
||||
Log.e(TAG + ":" + "setPushTags", "onNext: " + batch);
|
||||
if (!TextUtils.isEmpty(batch)) {
|
||||
@@ -477,7 +479,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
requestSucceeded = true;
|
||||
Log.e("checkInfoUpdate", "onNext: " + response.data);
|
||||
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);
|
||||
} else {
|
||||
Log.e("checkInfoUpdate", "onNext: " + response);
|
||||
@@ -518,7 +520,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
requestSucceeded = true;
|
||||
Log.e(TAG + ":" + "checkUpdateStore", "onNext: " + response.data);
|
||||
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);
|
||||
} else {
|
||||
Log.e(TAG + ":" + "checkUpdateStore", "onNext: " + response);
|
||||
@@ -561,7 +563,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
requestSucceeded = true;
|
||||
Log.e("checkDesktopUpdate", "onNext: " + response.data);
|
||||
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);
|
||||
} else {
|
||||
Log.e("checkDesktopUpdate", "onNext: " + response);
|
||||
@@ -602,7 +604,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
requestSucceeded = true;
|
||||
Log.e("checkNotifyUpdate", "onNext: " + response.data);
|
||||
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);
|
||||
} else {
|
||||
Log.e("checkNotifyUpdate", "onNext: " + response);
|
||||
@@ -643,7 +645,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
requestSucceeded = true;
|
||||
Log.e("checkBrowserUpdate", "onNext: " + response.data);
|
||||
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);
|
||||
} else {
|
||||
Log.e("checkBrowserUpdate", "onNext: " + response);
|
||||
@@ -939,7 +941,8 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||
requestSucceeded = true;
|
||||
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) {
|
||||
String data = jsonObject.get("result").getAsString();
|
||||
//开机图标
|
||||
@@ -992,7 +995,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
requestSucceeded = true;
|
||||
Log.e(TAG + ":" + "getROMApp", "onNext: " + baseResponse);
|
||||
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();
|
||||
Settings.System.putString(mContext.getContentResolver(), "jgy_customromapp", packageName);
|
||||
} else {
|
||||
@@ -1170,7 +1173,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
try {
|
||||
String bodyString = responseBody.string();
|
||||
Log.e(TAG + ":" + "getAppIDControl", "bodyString: " + bodyString);
|
||||
JsonObject jsonObject = JsonParser.parseString(bodyString).getAsJsonObject();
|
||||
JsonObject jsonObject = parseString(bodyString).getAsJsonObject();
|
||||
int code = jsonObject.get("code").getAsInt();
|
||||
if (code == OK) {
|
||||
JsonObject data = jsonObject.getAsJsonObject("data");
|
||||
@@ -1238,7 +1241,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
try {
|
||||
String bodyString = responseBody.string();
|
||||
Log.e(TAG + ":" + "setSystemSetting", "onNext: " + bodyString);
|
||||
JsonObject jsonObject = JsonParser.parseString(bodyString).getAsJsonObject();
|
||||
JsonObject jsonObject = parseString(bodyString).getAsJsonObject();
|
||||
int code = jsonObject.get("code").getAsInt();
|
||||
if (code == OK) {
|
||||
String data = jsonObject.getAsJsonObject("data").toString();
|
||||
@@ -1475,7 +1478,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
Log.e(TAG + ":" + "getEBagCode", "onNext: " + baseResponse);
|
||||
int code = baseResponse.code;
|
||||
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();
|
||||
SPUtils.put(mContext, "ebagCode", ebagCode);
|
||||
} else {
|
||||
@@ -1512,7 +1515,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
Log.e("getWiFiPasswd", "onNext: ");
|
||||
if (listBaseResponse.code == OK) {
|
||||
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 {
|
||||
Log.e("getWiFiPasswd", "onNext: msg = " + listBaseResponse.msg);
|
||||
WiFiUtils.saveWiFiPasswd(listBaseResponse.data);
|
||||
@@ -1564,7 +1567,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
||||
Log.e(TAG + ":" + "getScreenLockState", "onNext: ");
|
||||
if (response.code == OK) {
|
||||
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();
|
||||
String name = jsonObject.get("name").getAsString();
|
||||
mView.setScreenLockStateFinish(is_screen_lock == 1, name);
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.net.ConnectivityManager;
|
||||
@@ -244,6 +245,10 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
||||
public void onCreate() {
|
||||
super.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);
|
||||
mPresenter = new MainSPresenter(this);
|
||||
mPresenter.attachView(this);
|
||||
|
||||
Reference in New Issue
Block a user