You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private static IToast newToast(ToastUtils toastUtils) {
if (!toastUtils.isNotUseSystemToast) {
if (NotificationManagerCompat.from(Utils.getApp()).areNotificationsEnabled()) {//源码中此处13会返回false,13以下返回true
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return new SystemToast(toastUtils);
}
if (!UtilsBridge.isGrantedDrawOverlays()) {
return new SystemToast(toastUtils);
}
}
}
The text was updated successfully, but these errors were encountered:
描述 Bug
安卓13上测试发现Activity退出前调用吐司,会在当前activity弹出吐司,退出当前activity后又重复在上一个activity弹一次,调试发现是因为没有调用SystemToast,走的是ActivityToast,13以下是正常的只弹了一次,因为13以下调用的是SystemToast,至于为什么有这个差异,是因为下面代码中的一个条件判断。
相关代码
The text was updated successfully, but these errors were encountered: