1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Added work to debug info

This commit is contained in:
M66B 2023-01-24 08:00:30 +01:00
parent 5e0f84a26d
commit 61554af6e9

View file

@ -89,6 +89,9 @@ import androidx.fragment.app.FragmentManager;
import androidx.preference.PreferenceManager;
import androidx.webkit.WebViewCompat;
import androidx.webkit.WebViewFeature;
import androidx.work.WorkInfo;
import androidx.work.WorkManager;
import androidx.work.WorkQuery;
import com.bugsnag.android.BreadcrumbType;
import com.bugsnag.android.Bugsnag;
@ -2921,6 +2924,24 @@ public class Log {
size += write(os, "\r\n");
try {
List<WorkInfo> works = WorkManager
.getInstance(context)
.getWorkInfos(WorkQuery.fromStates(
WorkInfo.State.ENQUEUED,
WorkInfo.State.BLOCKED,
WorkInfo.State.RUNNING))
.get();
for (WorkInfo work : works) {
size += write(os, String.format("Work: %s\r\n",
work.toString()));
}
} catch (Throwable ex) {
size += write(os, String.format("%s\r\n", ex));
}
size += write(os, "\r\n");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
Map<Integer, Integer> exts = SdkExtensions.getAllExtensionVersions();
for (Integer ext : exts.keySet())