Browse Source

1.添加点击更新策略判定

2.登陆时自动获取区域码
20241218TB223FC(测试jar包)
wangwanlei 8 months ago
parent
commit
683ad1b7f8

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

65
                if (NetworkUtils.isAvailable(context)){
65
                if (NetworkUtils.isAvailable(context)){
66
                    if (lastTimeLong+20*1000<System.currentTimeMillis()){
66
                    if (lastTimeLong+20*1000<System.currentTimeMillis()){
67
                        lastTimeLong=System.currentTimeMillis()
67
                        lastTimeLong=System.currentTimeMillis()
68
-                       UIEvent(Const.CODE2004.toString()).post()
68
+                       UIEvent(Const.ADAPTER2004).post()
69
                    }else{
69
                    }else{
70
                        Toaster.show(context.getString(R.string.strategyupdatetips))
70
                        Toaster.show(context.getString(R.string.strategyupdatetips))
71
                    }
71
                    }

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

281
         if (!NetworkUtils.isAvailable(this)){
281
         if (!NetworkUtils.isAvailable(this)){
282
             showTipsDialog(getString(R.string.checknettips))
282
             showTipsDialog(getString(R.string.checknettips))
283
         }
283
         }
284
+        regioncode = currentSpUtils.getParam(Const.REGIONCODEKEY, regioncode) as String
284
         useTimeStrategy()
285
         useTimeStrategy()
285
     }
286
     }
286
 
287
 
293
                     val cancelTv = v.findViewById<TextView>(R.id.dialog_cancel_tv)
294
                     val cancelTv = v.findViewById<TextView>(R.id.dialog_cancel_tv)
294
                     val editText = v.findViewById<EditText>(R.id.dialog_et)
295
                     val editText = v.findViewById<EditText>(R.id.dialog_et)
295
                     val titleTv=v.findViewById<TextView>(R.id.dialog_title_tv)
296
                     val titleTv=v.findViewById<TextView>(R.id.dialog_title_tv)
296
-                    regioncode = currentSpUtils.getParam(Const.REGIONCODEKEY, regioncode) as String
297
                     editText.setText(regioncode)
297
                     editText.setText(regioncode)
298
                     enterTv.setOnClickListener {
298
                     enterTv.setOnClickListener {
299
                         dialog.dismiss()
299
                         dialog.dismiss()

+ 2
- 0
corelib/src/main/java/com/xhly/corelib/Const.kt View File

135
 
135
 
136
     //更新策略
136
     //更新策略
137
     const val CODE2004 = 2004
137
     const val CODE2004 = 2004
138
+     //点击更新策略
139
+    const val ADAPTER2004="ADAPTER2004"
138
 
140
 
139
     //重启设备
141
     //重启设备
140
     const val CODE2005 = 2005
142
     const val CODE2005 = 2005

Loading…
Cancel
Save