|
|
@ -252,19 +252,6 @@ public class MyApplication extends Application { |
|
|
throwable.getMessage(), "\n", sw.toString()); |
|
|
throwable.getMessage(), "\n", sw.toString()); |
|
|
LoggerUtil.e("APP崩溃", errorLog); |
|
|
LoggerUtil.e("APP崩溃", errorLog); |
|
|
restartApp(); |
|
|
restartApp(); |
|
|
Intent intent = new Intent(Constant.ACTION_APP_CRASH); |
|
|
|
|
|
intent.putExtra(Constant.PACKAGE_NAME, DeviceUtil.getPackageName()); |
|
|
|
|
|
sendStickyBroadcast(intent); |
|
|
|
|
|
sendBroadcast(new Intent(Constant.ACTION_EXIT)); |
|
|
|
|
|
try { |
|
|
|
|
|
PackageManager packageManager = getPackageManager(); |
|
|
|
|
|
Intent appIntent = packageManager.getLaunchIntentForPackage(Constant.APP_CRASH_PACKAGE_NAME); |
|
|
|
|
|
startActivity(appIntent); |
|
|
|
|
|
} catch (Throwable t) { |
|
|
|
|
|
LoggerUtil.e("崩溃自启失败", StringUtil.getThrowableStr(t)); |
|
|
|
|
|
restartApp(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -284,6 +271,7 @@ public class MyApplication extends Application { |
|
|
} |
|
|
} |
|
|
try { |
|
|
try { |
|
|
Thread.sleep(6000); |
|
|
Thread.sleep(6000); |
|
|
|
|
|
SignWayUtil.reboot(); |
|
|
} catch (InterruptedException e) { |
|
|
} catch (InterruptedException e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
|