From 157cf110be5f9e58d620ad19f7a8cde19fb74d1b Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 24 Apr 2020 07:50:20 +0200 Subject: [PATCH] Added network state to debug info --- app/src/main/java/eu/faircode/email/Log.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index 3963c39f35..ec21d58781 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -1164,6 +1164,13 @@ public class Log { } size += write(os, "VPN active=" + ConnectionHelper.vpnActive(context) + "\r\n\r\n"); + + ConnectionHelper.NetworkState state = ConnectionHelper.getNetworkState(context); + size += write(os, "Connected=" + state.isConnected() + "\r\n"); + size += write(os, "Suitable=" + state.isSuitable() + "\r\n"); + size += write(os, "Unmetered=" + state.isUnmetered() + "\r\n"); + size += write(os, "Roaming=" + state.isRoaming() + "\r\n"); + size += write(os, "Type=" + state.getType() + "\r\n\r\n"); } db.attachment().setDownloaded(attachment.id, size);