Explorar o código

Merge branch 'master' of https://github.com/Psiphon-Labs/psiphon-tunnel-core into staging-client

Rod Hynes %!s(int64=9) %!d(string=hai) anos
pai
achega
50c6dec200
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

+ 6 - 4
MobileLibrary/Android/PsiphonTunnel/PsiphonTunnel.java

@@ -498,10 +498,12 @@ public class PsiphonTunnel extends Psi.PsiphonProvider.Stub {
                 JSONObject data = notice.getJSONObject("data");
                 mHostService.onClientVerificationRequired(data.getString("nonce"), data.getInt("ttlSeconds"), data.getBoolean("resetCache"));
             } else if (noticeType.equals("ActiveTunnel")) {
-                if (notice.getJSONObject("data").getBoolean("isTCS")) {
-                  disableUdpGwKeepalive();
-                } else {
-                  enableUdpGwKeepalive();
+                if (isVPNMode()) {
+                    if (notice.getJSONObject("data").getBoolean("isTCS")) {
+                      disableUdpGwKeepalive();
+                    } else {
+                      enableUdpGwKeepalive();
+                    }
                 }
             }