From 6f3e293df23dc912642e7280f3a79c0170497086 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 23 Apr 2022 08:47:46 +0200 Subject: [PATCH] Fixed VPN only for Android 5/6 --- app/src/main/java/eu/faircode/email/ConnectionHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/ConnectionHelper.java b/app/src/main/java/eu/faircode/email/ConnectionHelper.java index b56703cc22..35a5423a5d 100644 --- a/app/src/main/java/eu/faircode/email/ConnectionHelper.java +++ b/app/src/main/java/eu/faircode/email/ConnectionHelper.java @@ -252,6 +252,8 @@ public class ConnectionHelper { NetworkInfo ani = cm.getActiveNetworkInfo(); if (ani == null || !ani.isConnected()) return null; + if (vpn_only && !vpnActive(context)) + return null; return cm.isActiveNetworkMetered(); }