From d40bf929534a602f3d46e40a9fc37dcf9134ee17 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 22 Nov 2020 14:18:55 +0100 Subject: [PATCH] Suspended: no IP traffic --- app/src/main/java/eu/faircode/email/ConnectionHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ConnectionHelper.java b/app/src/main/java/eu/faircode/email/ConnectionHelper.java index ca9c461c6f..4ebd039308 100644 --- a/app/src/main/java/eu/faircode/email/ConnectionHelper.java +++ b/app/src/main/java/eu/faircode/email/ConnectionHelper.java @@ -230,10 +230,10 @@ public class ConnectionHelper { return metered; } + // onLost [... state: SUSPENDED/SUSPENDED ... available: true] // onLost [... state: DISCONNECTED/DISCONNECTED ... available: true] NetworkInfo ani = cm.getNetworkInfo(active); - if (ani == null || ani.getState() == NetworkInfo.State.DISCONNECTED) { - // State can incorrectly be SUSPENDED + if (ani == null || ani.getState() != NetworkInfo.State.CONNECTED) { Log.i("isMetered: no active info ani=" + ani); return null; }