version:6.4.1

fix:
update:去掉腾讯推送,增加保存电子书包激活码
This commit is contained in:
2023-08-14 10:31:06 +08:00
parent 8c948e62be
commit 03901123da
47 changed files with 565 additions and 1061 deletions

View File

@@ -57,9 +57,11 @@ import com.tencent.mmkv.MMKV;
import java.io.File;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
@@ -207,20 +209,7 @@ public class PushManager {
switch (title) {
case MSG_DELETE:
ToastUtil.betaShow("收到管控:应用删除");
if (!TextUtils.isEmpty(extras)) {
JsonObject jsonObject = GsonUtils.getJsonObject(extras);
String pkg = jsonObject.get("package_name").getAsString();
if (TextUtils.isEmpty(pkg)) return;
ApkUtils.UninstallAPP(mContext, pkg);
}
Handler.getMain().postDelayed(new Runnable() {
@Override
public void run() {
NetInterfaceManager.getInstance().getDesktopIcon();
NetInterfaceManager.getInstance().getDefaultDesktop();
NetInterfaceManager.getInstance().getNetAndLaunchSetting();
}
}, 1234);
deleteApp(extras);
break;
case MSG_SETTING:
ToastUtil.betaShow("收到管控:系统设置");
@@ -395,6 +384,7 @@ public class PushManager {
}
Log.e(TAG, "MapAddress: " + SPUtils.get(mContext, "MapAddress", "-"));
Log.e(TAG, "MapError: " + SPUtils.get(mContext, "MapError", "-"));
locationClient.stop();
}
@Override
@@ -543,12 +533,39 @@ public class PushManager {
getBatteryInfo(mContext);
break;
case UPDATE_DESKTOP:
NetInterfaceManager.getInstance().getDefaultDesktop();
break;
default:
}
}
private void deleteApp(String extras) {
if (!TextUtils.isEmpty(extras)) {
JsonObject jsonObject = GsonUtils.getJsonObject(extras);
String pkg = jsonObject.get("package_name").getAsString();
if (TextUtils.isEmpty(pkg)) return;
String forceApp = Settings.System.getString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP);
if (!TextUtils.isEmpty(forceApp)) {
List<String> forceAppList = new ArrayList<>(Arrays.asList(forceApp.split(",")));
forceAppList.remove(pkg);
if (forceAppList.size() != 0) {
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, String.join(",", forceAppList));
} else {
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, "");
}
}
ApkUtils.UninstallAPP(mContext, pkg);
}
Handler.getMain().postDelayed(new Runnable() {
@Override
public void run() {
NetInterfaceManager.getInstance().getDesktopIcon();
NetInterfaceManager.getInstance().getDefaultDesktop();
NetInterfaceManager.getInstance().getNetAndLaunchSetting();
}
}, 1234);
}
private int changeNum(int paramInt) {
return paramInt == 0 ? 1 : 0;
}