Browse Source

1.添加飞行模式禁用

2025_1_17_tb223fc
wangwanlei 2 months ago
parent
commit
fad5ab6112
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      app/src/main/java/com/xhly/manageapp/ManageApplication.kt

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

581
          */
581
          */
582
         fun enableUsbDebugging(enableFlag: Boolean) {
582
         fun enableUsbDebugging(enableFlag: Boolean) {
583
             if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()) {
583
             if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()) {
584
-                csdkManager?.enableUsbDebugging(enableFlag)
584
+                csdkManager?.enableUsbDebugging(true)
585
                 if (ModelNameUtils.IS_LianxX505f()) {
585
                 if (ModelNameUtils.IS_LianxX505f()) {
586
                     //关闭usb调试时设置为充电模式
586
                     //关闭usb调试时设置为充电模式
587
                     if (!enableFlag) {
587
                     if (!enableFlag) {
588
                         setCurrentUsbMode(0)
588
                         setCurrentUsbMode(0)
589
                     }
589
                     }
590
+                }else if (ModelNameUtils.IS_LianxTB223FC()){
591
+                    setCurrentUsbMode(0)
590
                 }
592
                 }
591
             }
593
             }
592
         }
594
         }
595
          * 将 设置USB模式 0 充电
597
          * 将 设置USB模式 0 充电
596
          */
598
          */
597
         fun setCurrentUsbMode(type: Int = 0) {
599
         fun setCurrentUsbMode(type: Int = 0) {
598
-            if (ModelNameUtils.IS_LianxX505f()) {
600
+            if (ModelNameUtils.IS_LianxX505f()|| ModelNameUtils.IS_LianxTB223FC()) {
599
                 //关闭usb调试时设置为充电模式
601
                 //关闭usb调试时设置为充电模式
600
                 csdkManager?.setCurrentUsbMode(type)
602
                 csdkManager?.setCurrentUsbMode(type)
601
             }
603
             }
604
+            disallowAirplaneMode_v3(true)
602
         }
605
         }
603
 
606
 
604
         /**
607
         /**

Loading…
Cancel
Save