summaryrefslogtreecommitdiff
path: root/src/se/leap/bitmaskclient/EIP.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/bitmaskclient/EIP.java')
-rw-r--r--src/se/leap/bitmaskclient/EIP.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/se/leap/bitmaskclient/EIP.java b/src/se/leap/bitmaskclient/EIP.java
index 2b7fd39f..25ea88f7 100644
--- a/src/se/leap/bitmaskclient/EIP.java
+++ b/src/se/leap/bitmaskclient/EIP.java
@@ -96,13 +96,7 @@ public final class EIP extends IntentService {
context = getApplicationContext();
- try {
- eipDefinition = ConfigHelper.getJsonFromSharedPref(KEY);
- parsedEipSerial = ConfigHelper.getIntFromSharedPref(PARSED_SERIAL);
- } catch (JSONException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ updateEIPService();
this.retreiveVpnService();
}
@@ -250,8 +244,8 @@ public final class EIP extends IntentService {
*/
private void updateEIPService() {
try {
- eipDefinition = ConfigHelper.getJsonFromSharedPref(EIP.KEY);
- parsedEipSerial = ConfigHelper.getIntFromSharedPref(PARSED_SERIAL);
+ eipDefinition = new JSONObject(getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).getString(KEY, ""));
+ parsedEipSerial = getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).getInt(PARSED_SERIAL, 0);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -315,8 +309,7 @@ public final class EIP extends IntentService {
e.printStackTrace();
}
}
-
- ConfigHelper.saveSharedPref(PARSED_SERIAL, eipDefinition.optInt(Provider.API_RETURN_SERIAL));
+ getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).edit().putInt(PARSED_SERIAL, eipDefinition.optInt(Provider.API_RETURN_SERIAL)).commit();
}
/**