Browse Source

1.解除管控时,重置未知来源权限。

20241218TB223FC(测试jar包)
wangwanlei 5 months ago
parent
commit
28bc6bbff9
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      app/src/main/java/com/xhly/manageapp/utils/StrategyUtils.kt

+ 4
- 0
app/src/main/java/com/xhly/manageapp/utils/StrategyUtils.kt View File

@@ -398,6 +398,8 @@ object StrategyUtils {
398 398
               ManageApplication.setLockScreenMode(1)
399 399
               //关闭运行时权限
400 400
               ManageApplication.setRuntimePermissions(false)
401
+              //未知来源
402
+              ManageApplication.enableAllUnkownsourcesV3(false)
401 403
               //X505F默认应用解除应用冻结
402 404
               Const.X505FBANAPPLIST.forEach {
403 405
                   if (ModelNameUtils.IS_LianxX505f()){
@@ -442,6 +444,8 @@ object StrategyUtils {
442 444
             //是505f则执行
443 445
             //启用网络白名单,需要处理,不能每次都清除之前的白名单所以默认只添加不移除,请求接口时才移除。目前登录成功才控制
444 446
             if (loginSucess){
447
+                //禁止安装app
448
+                ManageApplication.disableInstallation(true)
445 449
                 ManageApplication.setDefaultUrlWhiteListWrite(arrayListOf())
446 450
                 //给自己以及联想sn验证加入网络白名单
447 451
                 ManageApplication.addAppWhiteRule(arrayListOf(Const.CURRENTAPPPKG, "com.lenovo.mia.setupwizard"),false)

Loading…
Cancel
Save