mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 13:14:39 +00:00
Added debug info fail safes
This commit is contained in:
parent
5b857324bf
commit
79dde3f351
1 changed files with 585 additions and 549 deletions
|
@ -1970,7 +1970,8 @@ public class Log {
|
|||
return sb;
|
||||
}
|
||||
|
||||
private static void attachSettings(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachSettings(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -1996,9 +1997,13 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void attachAccounts(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachAccounts(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2164,9 +2169,13 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void attachNetworkInfo(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachNetworkInfo(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2238,9 +2247,13 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void attachLog(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachLog(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2270,9 +2283,13 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void attachOperations(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachOperations(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2307,9 +2324,13 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void attachTasks(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachTasks(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2333,9 +2354,13 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void attachLogcat(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachLogcat(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2370,10 +2395,14 @@ public class Log {
|
|||
if (proc != null)
|
||||
proc.destroy();
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
private static void attachNotificationInfo(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachNotificationInfo(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2441,9 +2470,13 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static void attachEnvironment(Context context, long id, int sequence) throws IOException {
|
||||
private static void attachEnvironment(Context context, long id, int sequence) {
|
||||
try {
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
EntityAttachment attachment = new EntityAttachment();
|
||||
|
@ -2547,6 +2580,9 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getEventType(int type) {
|
||||
|
|
Loading…
Reference in a new issue