|
@@ -13,6 +13,7 @@ import com.github.anrwatchdog.ANRError;
|
|
import com.github.anrwatchdog.ANRWatchDog;
|
|
import com.github.anrwatchdog.ANRWatchDog;
|
|
import com.wdkl.callingbed2.MyApplication;
|
|
import com.wdkl.callingbed2.MyApplication;
|
|
import com.wdkl.callingbed2.common.Constants;
|
|
import com.wdkl.callingbed2.common.Constants;
|
|
|
|
+import com.wdkl.callingbed2.util.UploadLogInformationUtils;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
import java.io.FileOutputStream;
|
|
import java.io.FileOutputStream;
|
|
@@ -46,6 +47,7 @@ public class AnrFcExceptionUtil implements Thread.UncaughtExceptionHandler {
|
|
* 格式化时间
|
|
* 格式化时间
|
|
*/
|
|
*/
|
|
private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
|
|
private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
|
|
|
|
+ private UploadLogInformationUtils uploadLogInformationUtils;
|
|
|
|
|
|
public static AnrFcExceptionUtil getInstance(MyApplication application) {
|
|
public static AnrFcExceptionUtil getInstance(MyApplication application) {
|
|
if (mAnrFcExceptionUtil == null) {
|
|
if (mAnrFcExceptionUtil == null) {
|
|
@@ -133,6 +135,11 @@ public class AnrFcExceptionUtil implements Thread.UncaughtExceptionHandler {
|
|
printWriter.close();
|
|
printWriter.close();
|
|
String result = writer.toString();
|
|
String result = writer.toString();
|
|
sb.append(result);
|
|
sb.append(result);
|
|
|
|
+ if(uploadLogInformationUtils == null){
|
|
|
|
+ uploadLogInformationUtils = new UploadLogInformationUtils();
|
|
|
|
+ }
|
|
|
|
+ uploadLogInformationUtils.uploadingErrorLog(Constants.URL+Constants.URL_END+Constants.UPLOADING_ERROR_LOG,
|
|
|
|
+ "","","",sb.toString(),"");
|
|
try {
|
|
try {
|
|
long timestamp = System.currentTimeMillis();
|
|
long timestamp = System.currentTimeMillis();
|
|
String time = format.format(new Date());
|
|
String time = format.format(new Date());
|