Browse Source

1.添加jar包的缓存清理功能。

20241218TB223FC(测试jar包)
wangwanlei 9 months ago
parent
commit
3e565651ca
1 changed files with 20 additions and 2 deletions
  1. 20
    2
      app/src/main/java/com/xhly/manageapp/ManageApplication.kt

+ 20
- 2
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

9
 import androidx.core.content.ContextCompat
9
 import androidx.core.content.ContextCompat
10
 import androidx.multidex.MultiDexApplication
10
 import androidx.multidex.MultiDexApplication
11
 import com.hjq.toast.Toaster
11
 import com.hjq.toast.Toaster
12
+import com.xhly.corelib.Const
12
 import com.xhly.corelib.utils.LogShow
13
 import com.xhly.corelib.utils.LogShow
13
 import com.xhly.corelib.utils.ModelNameUtils
14
 import com.xhly.corelib.utils.ModelNameUtils
14
 import com.xhly.manageapp.service.websocket.AppSocket
15
 import com.xhly.manageapp.service.websocket.AppSocket
482
                 csdkManager?.SetEnable(enableFlag)
483
                 csdkManager?.SetEnable(enableFlag)
483
             }
484
             }
484
         }
485
         }
486
+
487
+        /**
488
+         * 清除应用数据
489
+         */
490
+        fun clearAppData(pkgList: ArrayList<String>){
491
+            if (ModelNameUtils.IS_LianxX505f()) {
492
+                pkgList.forEach {
493
+                    csdkManager?.clearAppData(it)
494
+                }
495
+            }
496
+        }
485
     }
497
     }
486
 
498
 
487
     override fun onCreate() {
499
     override fun onCreate() {
499
                     "com.xhkjedu.xh_control_appstore"
511
                     "com.xhkjedu.xh_control_appstore"
500
                 )
512
                 )
501
             )
513
             )
514
+            //允许运行时权限,禁止状态栏下拉,屏蔽底部虚拟键。
502
             setRuntimePermissions(true)
515
             setRuntimePermissions(true)
516
+            disableStatusBarPanel(true)
517
+            hideHomeSoftKey(true)
518
+            hideMenuSoftKey(true)
503
             enableAccessibility()
519
             enableAccessibility()
504
             setCustomLauncher(
520
             setCustomLauncher(
505
                 "com.xhly.manageapp",
521
                 "com.xhly.manageapp",
506
                 "com.xhly.manageapp.ui.ManageActivity"
522
                 "com.xhly.manageapp.ui.ManageActivity"
507
             )
523
             )
508
-            setUrlWhiteListWrite(arrayListOf("www.baidu.com"))
509
-            setUrlWhiteListEnable(false)
524
+            if (Const.isDebug){
525
+                csdkManager?.setPackageEnabled("com.xhly.easystud", true)
526
+                setUrlWhiteListEnable(false)
527
+            }
510
             csdkManager?.urlWhiteListRead()?.forEach {
528
             csdkManager?.urlWhiteListRead()?.forEach {
511
                 LogShow("白名单有"+it.toString())
529
                 LogShow("白名单有"+it.toString())
512
             }
530
             }

Loading…
Cancel
Save