Procházet zdrojové kódy

1.设置LianxTB223FC机型解除管控时的桌面设置。

2025_1_17_tb223fc
wangwanlei před 2 měsíci
rodič
revize
688961f4b8

+ 21
- 7
app/src/main/java/com/xhly/manageapp/utils/StrategyUtils.kt Zobrazit soubor

@@ -419,20 +419,33 @@ object StrategyUtils {
419 419
               AppSocket.onDestroy()
420 420
 
421 421
               //设置默认启动器
422
-              if (ModelNameUtils.IS_LianxX505f()||ModelNameUtils.IS_LianxX6e6f()){
422
+              if (ModelNameUtils.IS_LianxX505f()||ModelNameUtils.IS_LianxX6e6f()||ModelNameUtils.IS_LianxTB223FC()){
423 423
                   ManageApplication.setPackageEnabled("com.tblenovo.launcher",true)
424 424
                   //505f的桌面名称
425
-                  ManageApplication.setCustomLauncher("com.tblenovo.launcher","com.android.iotlauncher.IotLauncher")
425
+                  if (ModelNameUtils.IS_LianxTB223FC()){
426
+                      ManageApplication.setCustomLauncher("com.tblenovo.launcher","com.android.searchlauncher.SearchLauncher")
427
+                  }else{
428
+                      ManageApplication.setCustomLauncher("com.tblenovo.launcher","com.android.iotlauncher.IotLauncher")
429
+                  }
426 430
                   try {
427 431
                       //解除管控后,禁止切换启动器
428 432
                       ManageApplication.disallowSwitchLauncher_v3(true)
429 433
                       val launchIntent = Intent()
430
-                      launchIntent.setComponent(
431
-                          ComponentName(
432
-                              "com.tblenovo.launcher",
433
-                              "com.android.iotlauncher.IotLauncher"
434
+                      if (ModelNameUtils.IS_LianxTB223FC()){
435
+                          launchIntent.setComponent(
436
+                              ComponentName(
437
+                                  "com.tblenovo.launcher",
438
+                                  "com.android.searchlauncher.SearchLauncher"
439
+                              )
440
+                          )
441
+                      }else{
442
+                          launchIntent.setComponent(
443
+                              ComponentName(
444
+                                  "com.tblenovo.launcher",
445
+                                  "com.android.iotlauncher.IotLauncher"
446
+                              )
434 447
                           )
435
-                      )
448
+                      }
436 449
                       launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
437 450
                       context.startActivity(launchIntent)
438 451
                       exitProcess(0)
@@ -440,6 +453,7 @@ object StrategyUtils {
440 453
                       Toaster.showLong("失败原因"+e.toString())
441 454
                   }
442 455
               }
456
+
443 457
           }catch (e:Exception){
444 458
 
445 459
           }

Načítá se…
Zrušit
Uložit