Browse Source

1.添加X6e6f机型缺少的方法(清理缓存,护眼模式,屏幕旋转)。

20241218TB223FC(测试jar包)
wangwanlei 6 months ago
parent
commit
a3aed855cd

+ 4
- 0
app/src/main/java/android/app/csdk/CSDKManager.java View File

1559
     public void disabledFileShare(@Nullable boolean disallowed) {
1559
     public void disabledFileShare(@Nullable boolean disallowed) {
1560
         throw new RuntimeException("Stub!");
1560
         throw new RuntimeException("Stub!");
1561
     }
1561
     }
1562
+
1563
+    public void enableAutoRotation(boolean enabled) {
1564
+        throw new RuntimeException("Stub!");
1565
+    }
1562
 }
1566
 }

+ 6
- 1
app/src/main/java/com/xhly/manageapp/AppAdapter.kt View File

15
 import com.xhly.corelib.eventbus.UIEvent
15
 import com.xhly.corelib.eventbus.UIEvent
16
 import com.xhly.corelib.utils.AppUtils
16
 import com.xhly.corelib.utils.AppUtils
17
 import com.xhly.corelib.utils.LogShow
17
 import com.xhly.corelib.utils.LogShow
18
+import com.xhly.corelib.utils.ModelNameUtils
18
 import com.xhly.corelib.utils.NetworkUtils
19
 import com.xhly.corelib.utils.NetworkUtils
19
 import com.xhly.corelib.utils.SystemUtil
20
 import com.xhly.corelib.utils.SystemUtil
20
 import com.xhly.manageapp.utils.InstallUtils
21
 import com.xhly.manageapp.utils.InstallUtils
59
                 }
60
                 }
60
             }else if (appInfo.packageName.equals(Const.CUSTOMROTATIONAPP)){
61
             }else if (appInfo.packageName.equals(Const.CUSTOMROTATIONAPP)){
61
                 val rotationAllowed = SystemUtil.isRotationAllowed(context)
62
                 val rotationAllowed = SystemUtil.isRotationAllowed(context)
62
-                ManageApplication.disallowSetAutoRotation(rotationAllowed)
63
+                if (ModelNameUtils.IS_LianxX505f()){
64
+                    ManageApplication.disallowSetAutoRotation(rotationAllowed)
65
+                }else  if (ModelNameUtils.IS_LianxX6e6f()){
66
+                    ManageApplication.disallowSetAutoRotation(!rotationAllowed)
67
+                }
63
                 val tips=if (SystemUtil.isRotationAllowed(context)){
68
                 val tips=if (SystemUtil.isRotationAllowed(context)){
64
                     context.getString(R.string.closerotation)
69
                     context.getString(R.string.closerotation)
65
                 }else{
70
                 }else{

+ 8
- 6
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

448
         }
448
         }
449
 
449
 
450
         /**
450
         /**
451
-         * 禁止/允许 设置自动旋转屏幕   6E6F可能不存在这个方法
451
+         * 禁止/允许 设置自动旋转屏幕,505f和6e6f的值是反的
452
          */
452
          */
453
         fun disallowSetAutoRotation(enable: Boolean) {
453
         fun disallowSetAutoRotation(enable: Boolean) {
454
             if (ModelNameUtils.IS_LianxX505f()) {
454
             if (ModelNameUtils.IS_LianxX505f()) {
455
                 //true关闭 flase开启 6e6f可能不一样
455
                 //true关闭 flase开启 6e6f可能不一样
456
                 csdkManager?.setAutoRotate(enable)
456
                 csdkManager?.setAutoRotate(enable)
457
             } else if (ModelNameUtils.IS_LianxX6e6f()) {
457
             } else if (ModelNameUtils.IS_LianxX6e6f()) {
458
-                //csdkManager?.disallowSetAutoRotation(enable)
458
+                //true开启  flase关闭
459
+                csdkManager?.enableAutoRotation(enable)
459
             }
460
             }
460
         }
461
         }
461
 
462
 
683
         /**
684
         /**
684
          * 清除应用数据
685
          * 清除应用数据
685
          */
686
          */
686
-        //TODO 6E6F可能不存在这个方法
687
         fun clearAppData(pkgList: ArrayList<String>) {
687
         fun clearAppData(pkgList: ArrayList<String>) {
688
             if (ModelNameUtils.IS_LianxX505f()) {
688
             if (ModelNameUtils.IS_LianxX505f()) {
689
                 pkgList.forEach {
689
                 pkgList.forEach {
690
                     csdkManager?.clearAppData(it)
690
                     csdkManager?.clearAppData(it)
691
                 }
691
                 }
692
             }else if (ModelNameUtils.IS_LianxX6e6f()){
692
             }else if (ModelNameUtils.IS_LianxX6e6f()){
693
-
693
+                pkgList.forEach {
694
+                    csdkManager?.clearAppData(it)
695
+                }
694
             }
696
             }
695
         }
697
         }
696
 
698
 
780
         }
782
         }
781
 
783
 
782
         /**
784
         /**
783
-         * 505f设置护眼模式   6E6F可能不存在这个方法
785
+         * 设置护眼模式
784
          */
786
          */
785
         fun setEnabledEyeMode(enableFlag: Boolean) {
787
         fun setEnabledEyeMode(enableFlag: Boolean) {
786
             if (ModelNameUtils.IS_LianxX505f()) {
788
             if (ModelNameUtils.IS_LianxX505f()) {
787
                 csdkManager?.setEnabledEyeMode(enableFlag)
789
                 csdkManager?.setEnabledEyeMode(enableFlag)
788
             }else if (ModelNameUtils.IS_LianxX6e6f()){
790
             }else if (ModelNameUtils.IS_LianxX6e6f()){
789
-
791
+                csdkManager?.setEnabledEyeMode(enableFlag)
790
             }
792
             }
791
         }
793
         }
792
 
794
 

Loading…
Cancel
Save