new Thread用RxJava或者线程池代替
This commit is contained in:
@ -41,7 +41,7 @@ public class AppUncaughtHandler implements UncaughtExceptionHandler {
|
||||
// 如果用户没有处理则让系统默认的异常处理器来处理
|
||||
mDefaultHandler.uncaughtException(thread, ex);
|
||||
} else {
|
||||
new Thread() {
|
||||
AppController.MAIN_EXECUTOR.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Looper.prepare();
|
||||
@ -49,7 +49,7 @@ public class AppUncaughtHandler implements UncaughtExceptionHandler {
|
||||
"\"光环助手\"发生错误", Toast.LENGTH_SHORT).show();
|
||||
Looper.loop();
|
||||
}
|
||||
}.start();
|
||||
});
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
|
||||
Reference in New Issue
Block a user