Browse Source

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

20241218TB223FC(测试jar包)
wangwanlei 1 week ago
parent
commit
ba65b2f4ac
1 changed files with 21 additions and 7 deletions
  1. 21
    7
      app/src/main/java/com/xhly/manageapp/utils/StrategyUtils.kt

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

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

Loading…
Cancel
Save