Procházet zdrojové kódy

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

2.登陆时自动获取区域码
20241218TB223FC(测试jar包)
wangwanlei před 8 měsíci
rodič
revize
683ad1b7f8

+ 1
- 1
app/src/main/java/com/xhly/manageapp/AppAdapter.kt Zobrazit soubor

@@ -65,7 +65,7 @@ class AppAdapter(var context: Context, var data: ArrayList<AppInfo>) :
65 65
                if (NetworkUtils.isAvailable(context)){
66 66
                    if (lastTimeLong+20*1000<System.currentTimeMillis()){
67 67
                        lastTimeLong=System.currentTimeMillis()
68
-                       UIEvent(Const.CODE2004.toString()).post()
68
+                       UIEvent(Const.ADAPTER2004).post()
69 69
                    }else{
70 70
                        Toaster.show(context.getString(R.string.strategyupdatetips))
71 71
                    }

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

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

+ 2
- 0
corelib/src/main/java/com/xhly/corelib/Const.kt Zobrazit soubor

@@ -135,6 +135,8 @@ object Const {
135 135
 
136 136
     //更新策略
137 137
     const val CODE2004 = 2004
138
+     //点击更新策略
139
+    const val ADAPTER2004="ADAPTER2004"
138 140
 
139 141
     //重启设备
140 142
     const val CODE2005 = 2005

Načítá se…
Zrušit
Uložit