Explorar el Código

1.修改测试模式布局

20241218TB223FC(测试jar包)
wangwanlei hace 8 meses
padre
commit
9d9627ebf1

+ 20
- 1
app/src/main/java/com/xhly/manageapp/ui/ManageActivity.kt Ver fichero

@@ -56,6 +56,19 @@ class ManageActivity : BaseActivity<BaseViewModel, ActivityManageBinding>() {
56 56
 
57 57
 
58 58
     override fun initView() {
59
+        mBinding.addwifilistBtn.setOnClickListener {
60
+            //ManageApplication.addWifiWhiteList(arrayListOf("xhkjedun7"))
61
+           /* LogShow(ManageApplication.GetAppWhiteRules().toString())
62
+            ManageApplication.addAppWhiteRule(arrayListOf(packageName))*/
63
+            type=getType(type)
64
+            /*ManageApplication.disallowSetAutoRotation(type==0)*/
65
+            val getAppWhiteRules = ManageApplication.GetAppWhiteRules()
66
+            LogShow("白名单例外"+getAppWhiteRules.size.toString()+"|||"+getAppWhiteRules.toString())
67
+            ManageApplication.addAppWhiteRule(arrayListOf("com.baidu.searchbox"))
68
+        }
69
+        mBinding.removewifiBtn.setOnClickListener {
70
+           ManageApplication.clearAppWhiteRule()
71
+        }
59 72
         mBinding.adbopenBtn.setOnClickListener {
60 73
             Toast("设置" + ManageApplication.enableUsbDebugging(true))
61 74
         }
@@ -179,7 +192,7 @@ class ManageActivity : BaseActivity<BaseViewModel, ActivityManageBinding>() {
179 192
             //ManageApplication.addInstallPackageWhiteList(arrayListOf("com.coolapk.market"))
180 193
 
181 194
            // ManageApplication.removeInstallPackageWhiteList(arrayListOf("com.coolapk.market"))
182
-            ManageApplication.installPackage(File(name, "英语词典.apk").toString())
195
+            ManageApplication.installPackage(File(file , "test.apk").toString())
183 196
             //ZJAPPUtils.installApk(this, File(name, "test.apk"))
184 197
         }
185 198
         var type10 = 0
@@ -254,6 +267,12 @@ class ManageActivity : BaseActivity<BaseViewModel, ActivityManageBinding>() {
254 267
             ManageApplication.hideMenuSoftKey(b)
255 268
             ManageApplication.hideHomeSoftKey(b)
256 269
         }
270
+        mBinding.clearBtn.setOnClickListener {
271
+            ManageApplication.clearAppData(arrayListOf("com.coolapk.market"))
272
+        }
273
+        mBinding.speedBtn.setOnClickListener {
274
+            ManageApplication.killApplicationProcess("com.coolapk.market")
275
+        }
257 276
     }
258 277
 
259 278
 

+ 23
- 4
app/src/main/res/layout/activity_manage.xml Ver fichero

@@ -19,11 +19,20 @@
19 19
                 android:gravity="center_vertical">
20 20
 
21 21
                 <androidx.appcompat.widget.AppCompatButton
22
-                    android:id="@+id/closemanage_btn"
22
+                    android:id="@+id/addwifilist_btn"
23 23
                     android:layout_width="0dp"
24 24
                     android:layout_height="80dp"
25 25
                     android:layout_weight="1"
26
-                    android:text="退出管控" />
26
+                    android:visibility="gone"
27
+                    android:text="添加wifi白名单" />
28
+
29
+                <androidx.appcompat.widget.AppCompatButton
30
+                    android:id="@+id/removewifi_btn"
31
+                    android:layout_width="0dp"
32
+                    android:layout_height="80dp"
33
+                    android:layout_weight="1"
34
+                    android:visibility="gone"
35
+                    android:text="移除wifi白名单" />
27 36
 
28 37
                 <androidx.appcompat.widget.AppCompatButton
29 38
                     android:id="@+id/adbopenBtn"
@@ -205,8 +214,18 @@
205 214
                     android:layout_height="80dp"
206 215
                     android:layout_weight="1"
207 216
                     android:text="隐藏底部按键" />
208
-
209
-
217
+                <androidx.appcompat.widget.AppCompatButton
218
+                    android:id="@+id/clear_btn"
219
+                    android:layout_width="0dp"
220
+                    android:layout_height="80dp"
221
+                    android:layout_weight="1"
222
+                    android:text="清理缓存" />
223
+                <androidx.appcompat.widget.AppCompatButton
224
+                    android:id="@+id/speed_btn"
225
+                    android:layout_width="0dp"
226
+                    android:layout_height="80dp"
227
+                    android:layout_weight="1"
228
+                    android:text="清理内存" />
210 229
                 <EditText
211 230
                     android:layout_width="0dp"
212 231
                     android:layout_height="80dp"

Loading…
Cancelar
Guardar