1、增大弱网判断条件为大于4秒的才上报
2、关闭弱网Toast提示
This commit is contained in:
donghongyu-pc
2024-09-10 15:33:50 +08:00
parent 83232bd482
commit da8dd37c19
2 changed files with 12 additions and 9 deletions

View File

@@ -62,7 +62,10 @@ object WeakNetworkStrategy {
}
override fun logMethod(name: String, startTime: Long) {
ToastUtils.showShort("当前网络质量差!")
// 网络耗时大于5秒的提示
// if ((startTime / 1000000000.0) > 5) {
// ToastUtils.showShort("当前网络质量差!")
// }
// 网络质量差的请求上报埋点
val elapsedTime: Long = System.nanoTime() - startTime