Commit 536585c5 authored by wanglei's avatar wanglei

..

parent 0cb91aed
......@@ -254,7 +254,7 @@ class MyApplication : Application() {
initConfig(config)
} else {
EventUtils.event("configNull")
writeLogFile("config", "configNull")
// writeLogFile("config", "configNull")
}
}
}
......@@ -264,7 +264,7 @@ class MyApplication : Application() {
kotlin.runCatching {
val configBean = Gson().fromJson(config, ConfigBean::class.java)
writeLogFile("config", config)
// writeLogFile("config", config)
val jsonObject = JSONObject()
jsonObject.put("ut", configBean.ut)
......
......@@ -4,7 +4,6 @@ import com.base.scanqrclear.BuildConfig
import com.base.scanqrclear.GlobalConfig
import com.base.scanqrclear.utils.AppPreferences
import com.base.scanqrclear.utils.LogEx
import com.base.scanqrclear.utils.WriteLogEx.writeLogFile
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
......@@ -49,7 +48,7 @@ object NewComUtils {
fun requestCfg(callback: (json: String?) -> Unit) {
CoroutineScope(Dispatchers.IO).launch {
val response = doGet()
writeLogFile("response", response.toString())
// writeLogFile("response", response.toString())
if (response == null) {
withContext(Dispatchers.Main) {
callback(null)
......@@ -58,7 +57,7 @@ object NewComUtils {
}
val data = extractData(response)
writeLogFile("extractData", data.toString())
// writeLogFile("extractData", data.toString())
if (data == null) {
withContext(Dispatchers.Main) {
callback(null)
......@@ -81,14 +80,15 @@ object NewComUtils {
conn.setRequestMethod("GET")
conn.connectTimeout = 150000
val code = conn.getResponseCode()
writeLogFile("code", code.toString())
LogEx.logDebug(TAG, "code=$code")
// writeLogFile("code", code.toString())
if (200 == code) {
val json = BufferedReader(InputStreamReader(conn.inputStream)).readLine()
writeLogFile("json", json)
// writeLogFile("json", json)
return json
}
} catch (e: Exception) {
writeLogFile("Exception", e.message.toString())
// writeLogFile("Exception", e.message.toString())
}
return null
}
......
......@@ -63,14 +63,11 @@ class StartActivity : BaseActivity<ActivityStartBinding>(ActivityStartBinding::i
// finish()
// return
NotificationHoverUtils.stopNotificationHandler()
if (ConstObject.ifAgreePrivacy) {
agreePrivacy()
}
NotificationHoverUtils.stopNotificationHandler()
startJob()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
launcher.launch(arrayOf(Manifest.permission.POST_NOTIFICATIONS)) {
LogEx.logDebug(TAG, "POST_NOTIFICATIONS")
......@@ -78,6 +75,10 @@ class StartActivity : BaseActivity<ActivityStartBinding>(ActivityStartBinding::i
}
}
override fun onResumeOneShoot() {
super.onResumeOneShoot()
}
private fun agreePrivacy() {
......@@ -265,6 +266,7 @@ class StartActivity : BaseActivity<ActivityStartBinding>(ActivityStartBinding::i
}
finish()
intent.extras?.clear()
LogEx.logDebug(TAG, "finish")
}
private fun firstLauncherJump() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment