From 55831a85c78328463814eebf8c20af217bd22293 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Tue, 28 Jun 2022 15:52:57 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E8=A7=A3=E5=86=B3Binder=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E8=B6=856000=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原因:Android9开始每个uid的Binder Proxy记录超过6000条就提示 "Too many Binders sent to SYSTEM" --- .../com/mogo/eagle/core/utilcode/mogo/toast/TipToast.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/toast/TipToast.java b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/toast/TipToast.java index 4974612e11..bf528d2b09 100644 --- a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/toast/TipToast.java +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/toast/TipToast.java @@ -26,6 +26,7 @@ import androidx.lifecycle.LifecycleOwner; import com.mogo.eagle.core.utilcode.kotlin.ExtensionsKt; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; +import com.mogo.eagle.core.utilcode.util.ToastUtils; /** @@ -64,7 +65,12 @@ public final class TipToast { if (TextUtils.isEmpty(message)) { return; } - new ToastThread(new StringToastRunnable(sContext, message, duration, tipDrawable)).start(); + if (duration == Toast.LENGTH_LONG) { + ToastUtils.showLong(message); + } else { + ToastUtils.showShort(message); + } +// new ToastThread(new StringToastRunnable(sContext, message, duration, tipDrawable)).start(); } private static void tip(final int msgId, int duration, TipDrawable tipDrawable) {