|
@@ -113,6 +113,7 @@ import java.util.Calendar
|
113
|
113
|
import java.util.Timer
|
114
|
114
|
import java.util.TimerTask
|
115
|
115
|
import java.util.concurrent.TimeUnit
|
|
116
|
+import kotlin.system.exitProcess
|
116
|
117
|
|
117
|
118
|
|
118
|
119
|
class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), DownloadCallback {
|
|
@@ -546,7 +547,7 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), Downloa
|
546
|
547
|
it?.let {
|
547
|
548
|
spUtils.saveJson(Const.SCHOOLSETDEVICE, it)
|
548
|
549
|
initSchoolSet(it)
|
549
|
|
- mBinding.rv.visibility = View.VISIBLE
|
|
550
|
+ //mBinding.rv.visibility = View.VISIBLE
|
550
|
551
|
updateAppRv()
|
551
|
552
|
if (it.fromNetWorkType == 1) {
|
552
|
553
|
if (quitFlag) {
|
|
@@ -635,9 +636,11 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), Downloa
|
635
|
636
|
viewModel.autoAppData.collect {
|
636
|
637
|
lifecycleScope.launch {
|
637
|
638
|
withContext(Dispatchers.IO){
|
638
|
|
- delay(15000)
|
|
639
|
+ delay(3000)
|
639
|
640
|
}
|
640
|
|
- mBinding.flayoutRoot.visibility = View.GONE
|
|
641
|
+ /*mBinding.flayoutRoot.visibility = View.GONE*/
|
|
642
|
+ mBinding.userinfoLlayout.visibility=View.VISIBLE
|
|
643
|
+ mBinding.rv.visibility = View.VISIBLE
|
641
|
644
|
}
|
642
|
645
|
it?.let {
|
643
|
646
|
if (!netAutoAppFlag || isDestroyFlag) {
|
|
@@ -931,6 +934,42 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), Downloa
|
931
|
934
|
StrategyUtils.clearMemory(context, data)
|
932
|
935
|
Toaster.show(context.getString(R.string.speedend))
|
933
|
936
|
}
|
|
937
|
+/*
|
|
938
|
+ if (ModelNameUtils.IS_LianxX505f()|| ModelNameUtils.IS_LianxX6e6f()|| ModelNameUtils.IS_LianxTB223FC()){
|
|
939
|
+ ManageApplication.setPackageEnabled("com.tblenovo.launcher",true)
|
|
940
|
+ //505f的桌面名称
|
|
941
|
+ if (ModelNameUtils.IS_LianxTB223FC()){
|
|
942
|
+ ManageApplication.setCustomLauncher("com.tblenovo.launcher","com.android.searchlauncher.SearchLauncher")
|
|
943
|
+ }else{
|
|
944
|
+ ManageApplication.setCustomLauncher("com.tblenovo.launcher","com.android.iotlauncher.IotLauncher")
|
|
945
|
+ }
|
|
946
|
+ try {
|
|
947
|
+ //解除管控后,禁止切换启动器
|
|
948
|
+ ManageApplication.disallowSwitchLauncher_v3(true)
|
|
949
|
+ val launchIntent = Intent()
|
|
950
|
+ if (ModelNameUtils.IS_LianxTB223FC()){
|
|
951
|
+ launchIntent.setComponent(
|
|
952
|
+ ComponentName(
|
|
953
|
+ "com.tblenovo.launcher",
|
|
954
|
+ "com.android.searchlauncher.SearchLauncher"
|
|
955
|
+ )
|
|
956
|
+ )
|
|
957
|
+ }else{
|
|
958
|
+ launchIntent.setComponent(
|
|
959
|
+ ComponentName(
|
|
960
|
+ "com.tblenovo.launcher",
|
|
961
|
+ "com.android.iotlauncher.IotLauncher"
|
|
962
|
+ )
|
|
963
|
+ )
|
|
964
|
+ }
|
|
965
|
+ launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
966
|
+ startActivity(launchIntent)
|
|
967
|
+ }catch (e:Exception){
|
|
968
|
+ Toaster.showLong("失败原因"+e.toString())
|
|
969
|
+ }
|
|
970
|
+ }
|
|
971
|
+*/
|
|
972
|
+
|
934
|
973
|
}
|
935
|
974
|
|
936
|
975
|
override fun clearAppData(context: Context) {
|
|
@@ -2096,7 +2135,7 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(), Downloa
|
2096
|
2135
|
AppCompatResources.getDrawable(this, R.drawable.icon_updatestrategy)!!
|
2097
|
2136
|
)
|
2098
|
2137
|
)
|
2099
|
|
- mBinding.rv.visibility = View.VISIBLE
|
|
2138
|
+ //mBinding.rv.visibility = View.VISIBLE
|
2100
|
2139
|
if (adapter == null) {
|
2101
|
2140
|
adapter = AppAdapter(this, dataList)
|
2102
|
2141
|
adapter?.changePwdListener = getChangeCodeListener()
|