diff options
author | Sean Leonard <meanderingcode@aetherislands.net> | 2013-07-12 11:55:29 -0600 |
---|---|---|
committer | Sean Leonard <meanderingcode@aetherislands.net> | 2013-07-12 11:55:29 -0600 |
commit | 4bb6f30a63fb45ab5256b65c40a46979e8ece6ab (patch) | |
tree | c5af8bcb102434d3685adfa1793368c8a99ffaa0 /src/se/leap/leapclient/Dashboard.java | |
parent | 6a8a4acdca2c0828c2768a18a470ee64525e0d7f (diff) | |
parent | 6d532dd2d1a159d0053f5247db7d0c5480ce081e (diff) |
Merge branch 'feature/switch-provider-from-provider-detail-fragment' into develop
Diffstat (limited to 'src/se/leap/leapclient/Dashboard.java')
-rw-r--r-- | src/se/leap/leapclient/Dashboard.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 96b982fc..93963b3b 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 @@ -103,6 +103,8 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf View view = ((ViewGroup)findViewById(android.R.id.content)).getChildAt(0); logInDialog(view); } + } else if(resultCode == RESULT_CANCELED && data.hasExtra(ConfigHelper.QUIT)) { + finish(); } else configErrorDialog(); } |