summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/Dashboard.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/leapclient/Dashboard.java')
-rw-r--r--src/se/leap/leapclient/Dashboard.java10
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();
}