修复闪退问题
1. 捕抓个别 vivo 设备初始化下载证书时拿不到文件的闪退 2. 捕抓 ViewPager 和 ScrollView 在部分设备上多指操作的闪退 3. 捕抓接收商店应用跳转时链接格式不支持造成的闪退 4. 修复光环应用内更新弹窗关闭弹窗后偶发的闪退 5. 修复游戏评分列表数据更新时偶发的闪退 6. 修复下载管理已安装列表更新排序时偶发的闪退 7. 捕抓搜索历史数据库/日志上报数据库因为磁盘空间不足引起的闪退 8. 捕抓内存回收对象时因为系统缺陷导致的超时闪退
This commit is contained in:
@ -25,6 +25,7 @@ import java.lang.Thread.UncaughtExceptionHandler;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import io.sentry.core.Sentry;
|
||||
|
||||
@ -38,19 +39,21 @@ public class AppUncaughtHandler implements UncaughtExceptionHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uncaughtException(Thread thread, Throwable ex) {
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
public void uncaughtException(Thread t, Throwable e) {
|
||||
if (("FinalizerWatchdogDaemon").equals(t.getName())
|
||||
&& e instanceof TimeoutException) {
|
||||
// ignore timeoutException
|
||||
// detail can be found in this didi tech blog post https://mp.weixin.qq.com/s?__biz=MzU1ODEzNjI2NA==&mid=2247487185&idx=2&sn=cf2d9e10053f625bde0f61d246f14870&source=41#wechat_redirect
|
||||
} else {
|
||||
new Thread(() -> {
|
||||
Looper.prepare();
|
||||
Utils.toast(mContext.getApplicationContext(), "\"光环助手\"发生错误");
|
||||
Looper.loop();
|
||||
}
|
||||
});
|
||||
|
||||
saveLocalLog(mContext, ex);
|
||||
Sentry.captureException(ex);
|
||||
restart(mContext);
|
||||
});
|
||||
saveLocalLog(mContext, e);
|
||||
restart(mContext);
|
||||
Sentry.captureException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void restart(final Context context) {
|
||||
|
||||
Reference in New Issue
Block a user