diff options
-rw-r--r-- | src/se/leap/bitmaskclient/ConfigHelper.java | 3 | ||||
-rw-r--r-- | tests/src/se/leap/bitmaskclient/test/testConfigurationWizard.java | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/se/leap/bitmaskclient/ConfigHelper.java b/src/se/leap/bitmaskclient/ConfigHelper.java index a29ff301..dd7049a7 100644 --- a/src/se/leap/bitmaskclient/ConfigHelper.java +++ b/src/se/leap/bitmaskclient/ConfigHelper.java @@ -58,7 +58,8 @@ public class ConfigHelper { private static boolean checkSharedPrefs() { try { - shared_preferences = Dashboard.getAppContext().getSharedPreferences(Dashboard.SHARED_PREFERENCES,Context.MODE_PRIVATE); + if(shared_preferences == null) + shared_preferences = Dashboard.getAppContext().getSharedPreferences(Dashboard.SHARED_PREFERENCES,Context.MODE_PRIVATE); } catch (Exception e) { return false; } diff --git a/tests/src/se/leap/bitmaskclient/test/testConfigurationWizard.java b/tests/src/se/leap/bitmaskclient/test/testConfigurationWizard.java index 501530a5..34d2ae26 100644 --- a/tests/src/se/leap/bitmaskclient/test/testConfigurationWizard.java +++ b/tests/src/se/leap/bitmaskclient/test/testConfigurationWizard.java @@ -51,6 +51,7 @@ public class testConfigurationWizard extends ActivityInstrumentationTestCase2<Co solo.clickOnText(solo.getString(R.string.save)); added_providers = added_providers+1; assertTrue("Provider details dialog did not appear", solo.waitForFragmentByTag(ProviderDetailFragment.TAG, 60*1000)); + solo.goBack(); } public void testShowAbout() { |