new Thread用RxJava或者线程池代替

This commit is contained in:
kehaoyuan
2017-05-22 09:07:18 +08:00
parent 9369218821
commit 8643a12744
33 changed files with 231 additions and 216 deletions

View File

@ -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) {