|
@@ -118,6 +118,9 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
|
118
|
118
|
|
119
|
119
|
//标记是否请求了应用策略,都为真则提示
|
120
|
120
|
private var updateStrategyFlag = false
|
|
121
|
+
|
|
122
|
+ //标记启动时是否有网络
|
|
123
|
+ private var hasNetFlag = true
|
121
|
124
|
//标记当前是否锁定
|
122
|
125
|
private var mainLockFlag=false
|
123
|
126
|
private var autoAppFlag=true
|
|
@@ -792,6 +795,8 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
|
792
|
795
|
if (!screenFlag){
|
793
|
796
|
if (!NetworkUtils.isAvailable(this)){
|
794
|
797
|
showTipsDialog(getString(R.string.checknettips))
|
|
798
|
+ useTimeStrategy()
|
|
799
|
+ hasNetFlag=false
|
795
|
800
|
}
|
796
|
801
|
Const.backNum++
|
797
|
802
|
}
|
|
@@ -1388,6 +1393,10 @@ class MainActivity : BaseActivity<MainViewModel, ActivityMainBinding>(),Download
|
1388
|
1393
|
|
1389
|
1394
|
Const.STARTSOCKET -> {
|
1390
|
1395
|
AppSocket.startSocket(this)
|
|
1396
|
+ if(!hasNetFlag){
|
|
1397
|
+ hasNetFlag=true
|
|
1398
|
+ updateAllStrategy()
|
|
1399
|
+ }
|
1391
|
1400
|
}
|
1392
|
1401
|
|
1393
|
1402
|
Const.ACTION_SCREEN_ON->{
|