diff options
author | Sean Leonard <meanderingcode@aetherislands.net> | 2014-02-28 17:21:36 -0800 |
---|---|---|
committer | Sean Leonard <meanderingcode@aetherislands.net> | 2014-02-28 17:21:36 -0800 |
commit | dfc259473a26bb71bca226c8290d227fa954bcb8 (patch) | |
tree | 1132b8e00b08bfdd690693bcd9ef25db482bc5d0 /src/se/leap/bitmaskclient/EIP.java | |
parent | e6149d1d9ef77409e84d5982a92dd727f0bae2f7 (diff) | |
parent | 1fe78d00244f52f903435c970c0ebf0071a08f36 (diff) |
Merge branch 'feature/remove-shared-preferences-methods-from-ConfigHelper' into develop
Conflicts:
src/se/leap/bitmaskclient/Dashboard.java
Diffstat (limited to 'src/se/leap/bitmaskclient/EIP.java')
-rw-r--r-- | src/se/leap/bitmaskclient/EIP.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/se/leap/bitmaskclient/EIP.java b/src/se/leap/bitmaskclient/EIP.java index ecb7498f..70560919 100644 --- a/src/se/leap/bitmaskclient/EIP.java +++ b/src/se/leap/bitmaskclient/EIP.java @@ -97,13 +97,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(); } @@ -273,8 +267,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(); @@ -338,8 +332,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(); } /** |