|
|
|
@ -39,8 +39,11 @@ import qianmu.container.socket.manager.SocketServerManager; |
|
|
|
import qianmu.container.util.DeviceUtil; |
|
|
|
import qianmu.container.util.LoggerUtil; |
|
|
|
import qianmu.container.util.SSLSocketClient; |
|
|
|
import qianmu.container.util.SignWayUtil; |
|
|
|
import qianmu.container.util.StringUtil; |
|
|
|
|
|
|
|
import static qianmu.container.util.LoggerUtil.SAVE_LOG_DIR_PATH; |
|
|
|
|
|
|
|
@SuppressWarnings("All") |
|
|
|
public class MyApplication extends Application { |
|
|
|
|
|
|
|
@ -168,6 +171,12 @@ public class MyApplication extends Application { |
|
|
|
MyApplication.getInstance().dateTimeFormat.format(new Date(timeMillis)), ":\n", |
|
|
|
throwable.getMessage(), "\n", sw.toString()); |
|
|
|
LoggerUtil.e("errorLog", errorLog); |
|
|
|
//上传日志
|
|
|
|
String deviceCode = DeviceData.getDeviceInfo(DeviceData.HINT_DEVICE_CODE); |
|
|
|
String fileName = new SimpleDateFormat("yyyy-MM-dd").format(System.currentTimeMillis()); |
|
|
|
String path= StringUtil.strSplice(SAVE_LOG_DIR_PATH, "/", fileName, ".txt"); |
|
|
|
LoggerUtil.uploadLogFile(path,deviceCode,"","1"); |
|
|
|
|
|
|
|
restartApp(); |
|
|
|
Intent intent = new Intent(Constant.ACTION_APP_CRASH); |
|
|
|
intent.putExtra(Constant.PACKAGE_NAME, DeviceUtil.getPackageName()); |
|
|
|
@ -204,6 +213,7 @@ public class MyApplication extends Application { |
|
|
|
} catch (InterruptedException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
// SignWayUtil.reboot(); //重启设备
|
|
|
|
ProcessPhoenix.triggerRebirth(this); |
|
|
|
} |
|
|
|
|
|
|
|
|