Browse Source

1.添加打开护眼模式以及自动旋转的jar包方法。

2.目前旋转不生效
20241218TB223FC(测试jar包)
wangwanlei 6 months ago
parent
commit
0acccd9193

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

@@ -826,6 +826,23 @@ public class CSDKManager {
826 826
         throw new RuntimeException("Stub!");
827 827
     }
828 828
 
829
+    public void removeWiFiConfiguration(String ssid) {
830
+        throw new RuntimeException("Stub!");
831
+    }
832
+
833
+    public void setEnabledEyeMode(boolean enable) {
834
+        throw new RuntimeException("Stub!");
835
+    }
836
+
837
+    public boolean isEnabledEyeMode() {
838
+        throw new RuntimeException("Stub!");
839
+    }
840
+
841
+    public void setAutoRotate(boolean clip) {
842
+        throw new RuntimeException("Stub!");
843
+    }
844
+
845
+
829 846
     /**
830 847
      * 以下为x6e6f的方法
831 848
      * */

+ 14
- 3
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

@@ -421,11 +421,12 @@ class ManageApplication : MultiDexApplication() {
421 421
         }
422 422
 
423 423
         /**
424
-         * 禁止/允许 设置自动旋转屏幕 true:禁止设置自动旋转屏幕
424
+         * 禁止/允许 设置自动旋转屏幕
425 425
          */
426 426
         fun disallowSetAutoRotation(enable: Boolean) {
427 427
             if (ModelNameUtils.IS_LianxX505f()) {
428
-                //csdkManager?.disallowSetAutoRotation(enable)
428
+                //true:允许自动旋转屏幕
429
+                csdkManager?.setAutoRotate(enable)
429 430
             } else if (ModelNameUtils.IS_LianxX6e6f()) {
430 431
                 //csdkManager?.disallowSetAutoRotation(enable)
431 432
             }
@@ -718,6 +719,16 @@ class ManageApplication : MultiDexApplication() {
718 719
                 csdkManager?.setLockScreenMode(enableFlag)
719 720
             }
720 721
         }
722
+
723
+        /**
724
+         * 505f设置护眼模式
725
+         */
726
+        fun setEnabledEyeMode(enableFlag: Boolean){
727
+            if (ModelNameUtils.IS_LianxX505f()||ModelNameUtils.IS_LianxX6e6f()) {
728
+                csdkManager?.setEnabledEyeMode(enableFlag)
729
+            }
730
+        }
731
+
721 732
     }
722 733
 
723 734
     override fun onCreate() {
@@ -726,7 +737,7 @@ class ManageApplication : MultiDexApplication() {
726 737
         if (processName != null && processName.equals(packageName)) {
727 738
             LogUtils.DEBUG=com.xhkjedu.manageapp.BuildConfig.IS_DEBUG
728 739
             Const.setBaseUrl(com.xhkjedu.manageapp.BuildConfig.IS_DEBUG)
729
-            CrashReport.initCrashReport(applicationContext, "37c72ff74c", false);
740
+            CrashReport.initCrashReport(applicationContext, "37c72ff74c", false)
730 741
             instance = this
731 742
             val spUtils = SharedPreferencesUtils.getInstance(this)
732 743
             //获取是否已经解除管控

+ 2
- 1
app/src/main/java/com/xhly/manageapp/ui/main/activity/MainActivity.kt View File

@@ -1185,7 +1185,8 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
1185 1185
                 mBinding.userschoolTv.visibility = View.INVISIBLE
1186 1186
             }
1187 1187
             //设置护眼模式
1188
-            CustomOSUtils.openOrCloseNightMode(this, bean.protectedEyes == 1)
1188
+           /* CustomOSUtils.openOrCloseNightMode(this, bean.protectedEyes == 1)*/
1189
+            ManageApplication.setEnabledEyeMode(bean.protectedEyes == 1)
1189 1190
             startTimeTask(bean)
1190 1191
         }
1191 1192
     }

Loading…
Cancel
Save