summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-02-11 18:06:50 +0100
committercyBerta <cyberta@riseup.net>2019-03-09 13:55:08 +0100
commit210332df1df91ce626ebd332c973a1a246a04f6a (patch)
tree743bee2ebe088f87a3b97c48756145d34664783e /app/src/main
parenteb8f94c398f5a15fd064917602608bb6725420ef (diff)
fix intent handling in EipSetupProvider
(cherry picked from commit 36ea8c0)
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java
index f17fe28e..037a6952 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java
@@ -25,6 +25,7 @@ import se.leap.bitmaskclient.utils.PreferenceHelper;
import static android.app.Activity.RESULT_CANCELED;
import static android.content.Intent.CATEGORY_DEFAULT;
import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_CONNECTING_NO_SERVER_REPLY_YET;
+import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_NOTCONNECTED;
import static se.leap.bitmaskclient.Constants.BROADCAST_EIP_EVENT;
import static se.leap.bitmaskclient.Constants.BROADCAST_GATEWAY_SETUP_OBSERVER_EVENT;
import static se.leap.bitmaskclient.Constants.BROADCAST_PROVIDER_API_EVENT;
@@ -162,7 +163,8 @@ class EipSetupObserver extends BroadcastReceiver implements VpnStatus.StateListe
private void handleEipEvent(Intent intent) {
int resultCode = intent.getIntExtra(BROADCAST_RESULT_CODE, RESULT_CANCELED);
- String eipRequest = intent.getStringExtra(EIP_REQUEST);
+ Bundle result = intent.getBundleExtra(BROADCAST_RESULT_KEY);
+ String eipRequest = result.getString(EIP_REQUEST);
if (eipRequest == null) {
return;
}
@@ -243,7 +245,7 @@ class EipSetupObserver extends BroadcastReceiver implements VpnStatus.StateListe
}
int current = reconnectTry.get();
reconnectTry.set(current + 1);
- } else if ("NOPROCESS".equals(state) && ConnectionStatus.LEVEL_NOTCONNECTED == level) {
+ } else if ("NOPROCESS".equals(state) && LEVEL_NOTCONNECTED == level) {
//??
} else if ("CONNECTED".equals(state)) {
//saveLastProfile(context.getApplicationContext(), setupVpnProfile.getUUIDString());