|
@@ -15,7 +15,6 @@ import com.hjq.toast.Toaster
|
15
|
15
|
import com.kongzue.dialogx.DialogX
|
16
|
16
|
import com.tencent.bugly.crashreport.CrashReport
|
17
|
17
|
import com.xhly.corelib.Const
|
18
|
|
-import com.xhly.corelib.utils.AppUtils
|
19
|
18
|
import com.xhly.corelib.utils.LogShow
|
20
|
19
|
import com.xhly.corelib.utils.LogUtils
|
21
|
20
|
import com.xhly.corelib.utils.ModelNameUtils
|
|
@@ -23,7 +22,7 @@ import com.xhly.corelib.utils.SharedPreferencesUtils
|
23
|
22
|
import com.xhly.corelib.utils.SystemUtil
|
24
|
23
|
import com.xhly.manageapp.bean.user.UserBean
|
25
|
24
|
import com.xhly.manageapp.service.websocket.AppSocket
|
26
|
|
-import com.xhly.manageapp.utils.AfwUtils
|
|
25
|
+import com.xhly.manageapp.utils.TB23FCAfwUtils
|
27
|
26
|
import com.xhly.manageapp.utils.CurrentAppSharedPreferencesUtils
|
28
|
27
|
import com.xhly.manageapp.utils.StrategyUtils
|
29
|
28
|
import com.xhly.manageapp.utils.ZJAPPUtils
|
|
@@ -45,7 +44,7 @@ class ManageApplication : MultiDexApplication() {
|
45
|
44
|
//先移除,再添加。
|
46
|
45
|
removeInstallPackageWhiteList(getInstallPackageWhiteList())
|
47
|
46
|
pkgList.add(Const.CURRENTAPPPKG)
|
48
|
|
- pkgList.add(Const.CURRENTAPPPKG)
|
|
47
|
+ pkgList.add(Const.STOREAPPPKG)
|
49
|
48
|
pkgList.add("com.xhkjedu.pinyin")
|
50
|
49
|
csdkManager?.addInstallPackageWhiteList(pkgList)
|
51
|
50
|
}
|
|
@@ -290,8 +289,11 @@ class ManageApplication : MultiDexApplication() {
|
290
|
289
|
*禁用/启用OTG true:允许连接外部OTG
|
291
|
290
|
*/
|
292
|
291
|
fun setCustomOTG(enableFlag: Boolean) {
|
293
|
|
- if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()) {
|
294
|
|
- //csdkManager?.customOTG = enableFlag
|
|
292
|
+ if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()) {
|
|
293
|
+ csdkManager?.customOTG = enableFlag
|
|
294
|
+ }else if (ModelNameUtils.IS_LianxTB223FC()){
|
|
295
|
+ //223FC使用这个方法和拦截存储卡方法一致。
|
|
296
|
+ enableMassStorage(enableFlag)
|
295
|
297
|
}
|
296
|
298
|
}
|
297
|
299
|
|
|
@@ -629,8 +631,8 @@ class ManageApplication : MultiDexApplication() {
|
629
|
631
|
list.add(Const.BASEURL)
|
630
|
632
|
list.addAll(Const.whiteList)
|
631
|
633
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
632
|
|
- AfwUtils.addUrLWhiteList(list)
|
633
|
|
- AfwUtils.addUrLBlackList(arrayListOf("*"))
|
|
634
|
+ TB23FCAfwUtils.addUrLWhiteList(list)
|
|
635
|
+ TB23FCAfwUtils.addUrLBlackList(arrayListOf("*"))
|
634
|
636
|
}else{
|
635
|
637
|
csdkManager?.urlWhiteListWrite(list)
|
636
|
638
|
csdkManager?.urlBlackListWrite(arrayListOf("*"))
|
|
@@ -652,8 +654,8 @@ class ManageApplication : MultiDexApplication() {
|
652
|
654
|
list.add(Const.BASEURL)
|
653
|
655
|
list.addAll(Const.whiteList)
|
654
|
656
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
655
|
|
- AfwUtils.addUrLWhiteList(list)
|
656
|
|
- AfwUtils.addUrLBlackList(arrayListOf("*"))
|
|
657
|
+ TB23FCAfwUtils.addUrLWhiteList(list)
|
|
658
|
+ TB23FCAfwUtils.addUrLBlackList(arrayListOf("*"))
|
657
|
659
|
}else{
|
658
|
660
|
csdkManager?.urlWhiteListWrite(list)
|
659
|
661
|
csdkManager?.urlBlackListWrite(arrayListOf("*"))
|
|
@@ -667,7 +669,7 @@ class ManageApplication : MultiDexApplication() {
|
667
|
669
|
fun setUrlWhiteListEnable(enableFlag: Boolean) {
|
668
|
670
|
if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()) {
|
669
|
671
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
670
|
|
- AfwUtils.setEnable(enableFlag)
|
|
672
|
+ TB23FCAfwUtils.setEnable(enableFlag)
|
671
|
673
|
}else{
|
672
|
674
|
csdkManager?.SetEnable(enableFlag)
|
673
|
675
|
}
|
|
@@ -680,7 +682,7 @@ class ManageApplication : MultiDexApplication() {
|
680
|
682
|
fun ClearIpHostRules(): Boolean {
|
681
|
683
|
if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()) {
|
682
|
684
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
683
|
|
- AfwUtils.clearIpHostRules()
|
|
685
|
+ TB23FCAfwUtils.clearIpHostRules()
|
684
|
686
|
}else{
|
685
|
687
|
val clearIpHostRules = csdkManager?.ClearIpHostRules()
|
686
|
688
|
clearIpHostRules?.let {
|
|
@@ -734,7 +736,7 @@ class ManageApplication : MultiDexApplication() {
|
734
|
736
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
735
|
737
|
try {
|
736
|
738
|
pkgList.forEach {
|
737
|
|
- AfwUtils.jurisdiction(1,AfwUtils.getUUid(instance!!,it).toInt())
|
|
739
|
+ TB23FCAfwUtils.jurisdiction(1,TB23FCAfwUtils.getUUid(instance!!,it).toInt())
|
738
|
740
|
}
|
739
|
741
|
}catch (e:Exception){
|
740
|
742
|
|
|
@@ -753,7 +755,7 @@ class ManageApplication : MultiDexApplication() {
|
753
|
755
|
fun clearAppWhiteRule() {
|
754
|
756
|
if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()) {
|
755
|
757
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
756
|
|
- AfwUtils.clearAppRules()
|
|
758
|
+ TB23FCAfwUtils.clearAppRules()
|
757
|
759
|
}else{
|
758
|
760
|
csdkManager?.ClearAppRules()
|
759
|
761
|
//不移除自己和商店
|
|
@@ -772,7 +774,7 @@ class ManageApplication : MultiDexApplication() {
|
772
|
774
|
if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()) {
|
773
|
775
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
774
|
776
|
instance?.let {
|
775
|
|
- appList.addAll(AfwUtils.getNetAppWhiteList(it))
|
|
777
|
+ appList.addAll(TB23FCAfwUtils.getNetAppWhiteList(it))
|
776
|
778
|
}
|
777
|
779
|
}else{
|
778
|
780
|
val appWhiteRules = csdkManager?.appWhiteRules
|
|
@@ -802,7 +804,7 @@ class ManageApplication : MultiDexApplication() {
|
802
|
804
|
fun urlWhiteListRead(): List<String> {
|
803
|
805
|
if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()) {
|
804
|
806
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
805
|
|
- return AfwUtils.getUrlWhiteList()
|
|
807
|
+ return TB23FCAfwUtils.getUrlWhiteList()
|
806
|
808
|
}else{
|
807
|
809
|
csdkManager?.urlWhiteListRead()?.let {
|
808
|
810
|
return it
|
|
@@ -926,7 +928,7 @@ class ManageApplication : MultiDexApplication() {
|
926
|
928
|
Toaster.init(this)
|
927
|
929
|
DialogX.init(this)
|
928
|
930
|
if (ModelNameUtils.IS_LianxTB223FC()){
|
929
|
|
- AfwUtils.startBindService(this)
|
|
931
|
+ TB23FCAfwUtils.startBindService(this)
|
930
|
932
|
}
|
931
|
933
|
if (ModelNameUtils.IS_LianxX505f() || ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()) {
|
932
|
934
|
csdkManager = CSDKManager(this)
|