Merge branch 'release' into dev-4.7.0
# Conflicts: # app/src/main/java/com/gh/common/exposure/ExposureManager.kt # app/src/main/java/com/gh/common/loghub/LoghubUtils.kt # app/src/main/java/com/gh/common/videolog/VideoRecordUtils.kt # app/src/main/java/com/gh/download/DownloadManager.java # app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java # app/src/main/java/com/gh/gamecenter/gamedetail/dialog/GameDetailMoreDialog.kt # app/src/main/java/com/halo/assistant/HaloApp.java # dependencies.gradle # libraries/LGLibrary
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.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