|
@@ -1,37 +1,25 @@
|
1
|
1
|
package com.xhly.manageapp.ui
|
2
|
2
|
|
3
|
3
|
import BaseActivity
|
4
|
|
-import android.app.csdk.CSDKManager
|
5
|
4
|
import android.content.ComponentName
|
6
|
5
|
import android.content.Intent
|
7
|
6
|
import android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED
|
8
|
7
|
import android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|
9
|
8
|
import android.content.pm.PackageManager.DONT_KILL_APP
|
10
|
|
-import android.graphics.Color
|
11
|
9
|
import android.os.Environment
|
12
|
10
|
import android.os.Environment.DIRECTORY_DOWNLOADS
|
13
|
|
-import android.os.storage.StorageManager
|
14
|
11
|
import android.provider.Settings
|
15
|
|
-import android.view.View
|
16
|
|
-import android.widget.EditText
|
17
|
|
-import android.widget.TextView
|
|
12
|
+import android.util.Log
|
18
|
13
|
import com.hjq.toast.Toaster
|
19
|
|
-import com.kongzue.dialogx.dialogs.CustomDialog
|
20
|
|
-import com.kongzue.dialogx.interfaces.OnBindView
|
21
|
|
-import com.xhkjedu.manageapp.R
|
22
|
|
-import com.xhkjedu.manageapp.databinding.ActivityManageBinding
|
23
|
14
|
import com.xhkjedu.manageapp.databinding.ActivityManagetestBinding
|
24
|
|
-import com.xhly.corelib.Const
|
25
|
|
-import com.xhly.corelib.base.viewmodel.CommonBaseViewModel
|
26
|
15
|
import com.xhly.corelib.eventbus.UIEvent
|
27
|
16
|
import com.xhly.corelib.utils.LogShow
|
28
|
17
|
import com.xhly.corelib.utils.ModelNameUtils
|
29
|
18
|
import com.xhly.manageapp.ManageApplication
|
30
|
|
-import com.xhly.manageapp.bean.user.UserBean
|
|
19
|
+import com.xhly.manageapp.utils.AfwUtils
|
31
|
20
|
import com.xhly.manageapp.utils.CurrentAppSharedPreferencesUtils
|
32
|
21
|
import com.xhly.manageapp.utils.StrategyUtils
|
33
|
22
|
import com.xhly.manageapp.viewmodel.BaseViewModel
|
34
|
|
-import java.io.Console
|
35
|
23
|
import java.io.File
|
36
|
24
|
import kotlin.system.exitProcess
|
37
|
25
|
|
|
@@ -58,7 +46,9 @@ class ManageTestActivity : BaseActivity<BaseViewModel, ActivityManagetestBinding
|
58
|
46
|
//ManageApplication.enableAllUnkownsourcesV3(true)
|
59
|
47
|
}
|
60
|
48
|
|
61
|
|
-
|
|
49
|
+ override fun onResume() {
|
|
50
|
+ super.onResume()
|
|
51
|
+ }
|
62
|
52
|
override fun initView() {
|
63
|
53
|
mBinding.addwifilistBtn.setOnClickListener {
|
64
|
54
|
//ManageApplication.addWifiWhiteList(arrayListOf("xhkjedun7"))
|
|
@@ -339,6 +329,21 @@ class ManageTestActivity : BaseActivity<BaseViewModel, ActivityManagetestBinding
|
339
|
329
|
mBinding.xipingBtn.setOnClickListener {
|
340
|
330
|
ManageApplication.setSleepTimeoutV3()
|
341
|
331
|
}
|
|
332
|
+ mBinding.netappwBtn.setOnClickListener {
|
|
333
|
+ val uUid = AfwUtils.getUUid(this, "com.lenovo.leos.appstore")
|
|
334
|
+ AfwUtils.jurisdiction("白名单",uUid.toInt())
|
|
335
|
+ AfwUtils.getNetAppBlockList()
|
|
336
|
+ Toast(AfwUtils.getNetAppWhiteList())
|
|
337
|
+ }
|
|
338
|
+ mBinding.netappbBtn.setOnClickListener {
|
|
339
|
+ val uUid = AfwUtils.getUUid(this, "mark.via")
|
|
340
|
+ AfwUtils.jurisdiction("黑名单",uUid.toInt())
|
|
341
|
+ Toast(AfwUtils.getNetAppBlockList())
|
|
342
|
+ }
|
|
343
|
+ mBinding.neturlwBtn.setOnClickListener {
|
|
344
|
+ AfwUtils.addUrLWhiteList("*.baidu.com")
|
|
345
|
+ AfwUtils.addUrLBlackList("*")
|
|
346
|
+ }
|
342
|
347
|
}
|
343
|
348
|
|
344
|
349
|
|