Browse Source

1.默认设置星火输入法。

20241218TB223FC(测试jar包)
wangwanlei 4 months ago
parent
commit
e9a9b2085c

+ 4
- 1
app/src/main/java/com/xhly/manageapp/ManageApplication.kt View File

@@ -44,6 +44,7 @@ class ManageApplication : MultiDexApplication() {
44 44
                 removeInstallPackageWhiteList(getInstallPackageWhiteList())
45 45
                 pkgList.add(Const.CURRENTAPPPKG)
46 46
                 pkgList.add(Const.CURRENTAPPPKG)
47
+                pkgList.add("com.xhkjedu.pinyin")
47 48
                 csdkManager?.addInstallPackageWhiteList(pkgList)
48 49
             }
49 50
         }
@@ -55,6 +56,7 @@ class ManageApplication : MultiDexApplication() {
55 56
         fun removeInstallPackageWhiteList(pkgList: ArrayList<String>) {
56 57
             if ((ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()) && pkgList.size > 0) {
57 58
                 pkgList.remove(Const.CURRENTAPPPKG)
59
+                pkgList.remove("com.xhkjedu.pinyin")
58 60
                 csdkManager?.removeInstallPackageWhiteList(pkgList)
59 61
             }
60 62
         }
@@ -789,7 +791,7 @@ class ManageApplication : MultiDexApplication() {
789 791
         }
790 792
 
791 793
         //设置默认输入法
792
-        fun setDefaultInputMethod(pkg: String){
794
+        fun setDefaultInputMethod(pkg: String="com.xhkjedu.pinyin/.PinyinIME"){
793 795
             if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()){
794 796
                 try {
795 797
                     var defaultInputMethod = csdkManager?.setDefaultInputMethod(pkg)
@@ -819,6 +821,7 @@ class ManageApplication : MultiDexApplication() {
819 821
             if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()) {
820 822
                 csdkManager = CSDKManager(this)
821 823
                 //允许运行时权限
824
+                setDefaultInputMethod()
822 825
                 setRuntimePermissions(true)
823 826
                 enableAllUnkownsourcesV3(true)
824 827
             }

+ 1
- 0
app/src/main/java/com/xhly/manageapp/ui/login/activity/LoginActivity.kt View File

@@ -59,6 +59,7 @@ class LoginActivity : BaseActivity<LoginViewModel, ActivityLoginBinding>() {
59 59
     override fun getBinding() = ActivityLoginBinding.inflate(layoutInflater)
60 60
 
61 61
     override fun initData() {
62
+        ManageApplication.setDefaultInputMethod()
62 63
        viewModel.loginData.observe(this){
63 64
            waitDialog?.doDismiss()
64 65
            if (it.xhlyLoginSucess){

Loading…
Cancel
Save