bugfixes:使用jclasslib降级jar,对接全志酷比接口
This commit is contained in:
2025-06-13 10:49:48 +08:00
parent 60dab59ef8
commit eb73796554
7 changed files with 171 additions and 27 deletions

View File

@@ -9,6 +9,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.cubemdm.cubemdmmanager.CubeMdmManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.AudioManager;
@@ -715,9 +716,17 @@ public class PushManager {
List<String> forceAppList = new ArrayList<>(Arrays.asList(forceApp.split(",")));
forceAppList.remove(pkg);
if (forceAppList.size() != 0) {
if (JgyUtils.isAllWinnerDevice()) {
CubeMdmManager cubeMdmManager = (CubeMdmManager) mContext.getSystemService("cube_mdm");
cubeMdmManager.setForbidUnInstallPackageList(forceAppList);
}
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, String.join(",", forceAppList));
} else {
Settings.System.putString(mContext.getContentResolver(), CommonConfig.AOLE_ACTION_FORCE_APP, "");
if (JgyUtils.isAllWinnerDevice()) {
CubeMdmManager cubeMdmManager = (CubeMdmManager) mContext.getSystemService("cube_mdm");
cubeMdmManager.setForbidUnInstallPackageList(new ArrayList<>());
}
}
}
ApkUtils.UninstallAPP(mContext, pkg);