diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index cc8b0245f5..7c7fab487d 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -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 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 exts = SdkExtensions.getAllExtensionVersions(); for (Integer ext : exts.keySet())