summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/Dashboard.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-06-29 14:03:15 +0200
committerSean Leonard <meanderingcode@aetherislands.net>2013-07-12 11:54:52 -0600
commitb684f2fdd35064210d7c5ae760c1a2e4939b1ec5 (patch)
tree7b9ece739e4435488820072f4353cc751837cb72 /src/se/leap/leapclient/Dashboard.java
parent6a8a4acdca2c0828c2768a18a470ee64525e0d7f (diff)
Pressing back button, we don't choose any provider
Once in the provider detail fragment, if the user presses the back button, provider.json is removed from sharedpreferences (so that Dashboard does not start as if the user had selected the canceled provider) and ConfigurationWizard gets the focus.
Diffstat (limited to 'src/se/leap/leapclient/Dashboard.java')
-rw-r--r--src/se/leap/leapclient/Dashboard.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java
index 96b982fc..1e7fbf68 100644
--- a/src/se/leap/leapclient/Dashboard.java
+++ b/src/se/leap/leapclient/Dashboard.java
@@ -67,14 +67,14 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
setContentView(R.layout.client_dashboard);
- preferences = getSharedPreferences(ConfigHelper.PREFERENCES_KEY,MODE_PRIVATE);
+ ConfigHelper.setSharedPreferences(getSharedPreferences(ConfigHelper.PREFERENCES_KEY, MODE_PRIVATE));
if(ConfigHelper.shared_preferences == null)
ConfigHelper.setSharedPreferences(preferences);
- if (preferences.contains("provider") && preferences.getString(ConfigHelper.PROVIDER_KEY, null) != null)
- buildDashboard();
- else
+ if (ConfigHelper.getStringFromSharedPref(ConfigHelper.PROVIDER_KEY).isEmpty())
startActivityForResult(new Intent(this,ConfigurationWizard.class),CONFIGURE_LEAP);
+ else
+ buildDashboard();
}
@Override