summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-12-09 12:08:40 +0100
committerParménides GV <parmegv@sdf.org>2014-12-09 12:08:40 +0100
commit7da04dc635505c0bcfdcc2c86d186a7a6f0535f4 (patch)
tree72c37bd326cd76367e25f0b4bcee60b4ba907add /app/src/main/java/se
parent84f71ca604abb2b4aeb410dcec2c3cc5dff9bc39 (diff)
Release flavor updated, back button works.
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Dashboard.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java18
2 files changed, 11 insertions, 11 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
index e277221b..e3bd9b7d 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
@@ -143,9 +143,9 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
invalidateOptionsMenu();
if (data.hasExtra(LogInDialog.TAG)) {
logInDialog(Bundle.EMPTY);
- } else if (resultCode == RESULT_CANCELED && data.hasExtra(ACTION_QUIT)) {
- finish();
}
+ } else if (resultCode == RESULT_CANCELED && data.hasExtra(ACTION_QUIT)) {
+ finish();
} else
configErrorDialog();
} else if(requestCode == EIP.DISCONNECT) {
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
index b4208556..4363dd13 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
@@ -47,7 +47,6 @@ import static se.leap.bitmaskclient.eip.Constants.ACTION_STOP_EIP;
import static se.leap.bitmaskclient.eip.Constants.ACTION_UPDATE_EIP_SERVICE;
import static se.leap.bitmaskclient.eip.Constants.CERTIFICATE;
import static se.leap.bitmaskclient.eip.Constants.KEY;
-import static se.leap.bitmaskclient.eip.Constants.PARSED_SERIAL;
import static se.leap.bitmaskclient.eip.Constants.RECEIVER_TAG;
import static se.leap.bitmaskclient.eip.Constants.REQUEST_TAG;
@@ -209,18 +208,19 @@ public final class EIP extends IntentService {
*/
private void updateGateways(){
try {
- JSONArray gatewaysDefined = eip_definition.getJSONArray("gateways");
- for ( int i=0 ; i < gatewaysDefined.length(); i++ ){
- JSONObject gw = gatewaysDefined.getJSONObject(i);
- if(isOpenVpnGateway(gw)) {
- addGateway(new Gateway(eip_definition, context, gw));
- }
- }
+ if(eip_definition != null) {
+ JSONArray gatewaysDefined = eip_definition.getJSONArray("gateways");
+ for (int i = 0; i < gatewaysDefined.length(); i++) {
+ JSONObject gw = gatewaysDefined.getJSONObject(i);
+ if (isOpenVpnGateway(gw)) {
+ addGateway(new Gateway(eip_definition, context, gw));
+ }
+ }
+ }
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
- preferences.edit().putInt(PARSED_SERIAL, eip_definition.optInt(Provider.API_RETURN_SERIAL)).apply();
}
private boolean isOpenVpnGateway(JSONObject gateway) {