Ver código fonte

1.添加默认禁止截屏。

2.版本更新1.0.16
20241218TB223FC(测试jar包)
wangwanlei 7 meses atrás
pai
commit
a0b243f78c

+ 2
- 2
app/build.gradle.kts Ver arquivo

@@ -17,8 +17,8 @@ android {
17 17
         applicationId = "com.xhkjedu.manageapp"
18 18
         minSdk = 24
19 19
         targetSdk = 30
20
-        versionCode = 16
21
-        versionName = "1.0.15"
20
+        versionCode = 17
21
+        versionName = "1.0.16"
22 22
 
23 23
         testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
24 24
         vectorDrawables {

+ 3
- 3
app/src/main/java/com/xhly/manageapp/utils/StrategyUtils.kt Ver arquivo

@@ -369,8 +369,6 @@ object StrategyUtils {
369 369
      */
370 370
     public fun releaseControl(context: Context){
371 371
           try {
372
-              //允许截屏
373
-              ManageApplication.enableCaptureScreen(true)
374 372
               //解除状态栏管理
375 373
               ManageApplication.disableStatusBarPanel(false)
376 374
               //允许安装app
@@ -438,7 +436,7 @@ object StrategyUtils {
438 436
           }
439 437
     }
440 438
 
441
-    //初始化管控的默认规则
439
+    //初始化管控的默认规则 (x505f设置运行时权限默认打开,即使没有禁止安装应用也会导致应用无法安装)
442 440
     public fun initControlStrategy(loginSucess:Boolean=true){
443 441
         if (ModelNameUtils.IS_LianxX505f()||ModelNameUtils.IS_LianxX6e6f()) {
444 442
             //是505f则执行
@@ -452,6 +450,8 @@ object StrategyUtils {
452 450
             }
453 451
             //启用安装白名单
454 452
             ManageApplication.addInstallPackageWhiteList(arrayListOf(Const.CURRENTAPPPKG, Const.STOREAPPPKG))
453
+            //禁止截屏
454
+            ManageApplication.enableCaptureScreen(false)
455 455
             ManageApplication.setSleepTimeoutV3()
456 456
             //默认打开wifi禁止用户关闭
457 457
            // ManageApplication.disallowWifi(true)

Carregando…
Cancelar
Salvar