update:2020.5.14

fix:兼容Android10.0 http联网问题,静默安装问题
add:
This commit is contained in:
2020-05-14 18:34:36 +08:00
parent eb1f74288c
commit fdbecb973e
13 changed files with 236 additions and 195 deletions

View File

@@ -65,7 +65,7 @@ import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
*/
//public class MyApplication extends MultiDexApplication implements Thread.UncaughtExceptionHandler {
public class MyApplication extends MultiDexApplication {
public class MyApplication extends MultiDexApplication {
public static String userName = null;
private static final String TAG = "--MyApplication--";
@@ -442,13 +442,14 @@ import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
}
private void catchException() {
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
Log.d("捕获异常子线程:", Thread.currentThread().getName() +
"在:" + e.getStackTrace()[0].getClassName());
}
}
Thread.setDefaultUncaughtExceptionHandler(
new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
Log.d("捕获异常子线程:", Thread.currentThread().getName() +
"在:" + e.getStackTrace()[0].getClassName());
}
}
);
//下面是新增方法!
new Handler(Looper.getMainLooper()).post(new Runnable() {