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
         throw new RuntimeException("Stub!");
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
      * 以下为x6e6f的方法
847
      * 以下为x6e6f的方法
831
      * */
848
      * */

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

421
         }
421
         }
422
 
422
 
423
         /**
423
         /**
424
-         * 禁止/允许 设置自动旋转屏幕 true:禁止设置自动旋转屏幕
424
+         * 禁止/允许 设置自动旋转屏幕
425
          */
425
          */
426
         fun disallowSetAutoRotation(enable: Boolean) {
426
         fun disallowSetAutoRotation(enable: Boolean) {
427
             if (ModelNameUtils.IS_LianxX505f()) {
427
             if (ModelNameUtils.IS_LianxX505f()) {
428
-                //csdkManager?.disallowSetAutoRotation(enable)
428
+                //true:允许自动旋转屏幕
429
+                csdkManager?.setAutoRotate(enable)
429
             } else if (ModelNameUtils.IS_LianxX6e6f()) {
430
             } else if (ModelNameUtils.IS_LianxX6e6f()) {
430
                 //csdkManager?.disallowSetAutoRotation(enable)
431
                 //csdkManager?.disallowSetAutoRotation(enable)
431
             }
432
             }
718
                 csdkManager?.setLockScreenMode(enableFlag)
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
     override fun onCreate() {
734
     override fun onCreate() {
726
         if (processName != null && processName.equals(packageName)) {
737
         if (processName != null && processName.equals(packageName)) {
727
             LogUtils.DEBUG=com.xhkjedu.manageapp.BuildConfig.IS_DEBUG
738
             LogUtils.DEBUG=com.xhkjedu.manageapp.BuildConfig.IS_DEBUG
728
             Const.setBaseUrl(com.xhkjedu.manageapp.BuildConfig.IS_DEBUG)
739
             Const.setBaseUrl(com.xhkjedu.manageapp.BuildConfig.IS_DEBUG)
729
-            CrashReport.initCrashReport(applicationContext, "37c72ff74c", false);
740
+            CrashReport.initCrashReport(applicationContext, "37c72ff74c", false)
730
             instance = this
741
             instance = this
731
             val spUtils = SharedPreferencesUtils.getInstance(this)
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
                 mBinding.userschoolTv.visibility = View.INVISIBLE
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
             startTimeTask(bean)
1190
             startTimeTask(bean)
1190
         }
1191
         }
1191
     }
1192
     }

Loading…
Cancel
Save