fac86401
孙向锦
初始化C5 Vote
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package com.sunvote.xpadapp;
import com.sunvote.udptransfer.UDPModule;
import com.sunvote.util.LogUtil;
/**
* Created by Elvis on 2017/11/30 10:52
* Email:Eluis@psunsky.com
* 版权所有:长沙中天电子设计开发有限公司
* Description: 人大通用版 XPadAppRD
*/
public class Application extends android.app.Application {
@Override
public void onCreate() {
super.onCreate();
final Thread.UncaughtExceptionHandler uncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
LogUtil.e(UDPModule.TAG, "carsh(thread id:" + thread.getId() + ",thread name:" + thread.getName() + ")");
LogUtil.e(UDPModule.TAG, ex);
if (uncaughtExceptionHandler != null) {
uncaughtExceptionHandler.uncaughtException(thread, ex);
}
System.exit(0);
}
});
}
}
|