Permalink
Browse files

Cleared username/pwd on logout

  • Loading branch information...
1 parent f35c68f commit 6eb12e20534ffaa3a922c8d4c657bf8e13878d0f Sam Karp committed Apr 13, 2011
@@ -99,10 +99,9 @@ public boolean onOptionsItemSelected(MenuItem item) {
case R.id.logout_menu_button:
try {
UIUtils.logout(siteAuth);
- //Intent intent = new Intent(this, GeoCamTalkSettings.class);
- // intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
this.startActivity(new Intent(this, GeoCamTalkSettings.class));
- unregisterReceiver(receiver);
+ //unregisterReceiver(receiver);
}
catch (Exception e)
{
@@ -32,6 +32,7 @@
import roboguice.inject.InjectResource;
import android.content.Context;
import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
import com.google.inject.Inject;
@@ -234,6 +235,9 @@ public void logout()throws AuthenticationFailedException, ClientProtocolExceptio
HttpResponse r = httpClient.execute(p);
if (302 == r.getStatusLine().getStatusCode()) {
sessionIdCookie = null;
+ Editor editor = sharedPreferences.edit();
+ editor.clear();
+ editor.commit();
return;
} else {

0 comments on commit 6eb12e2

Please sign in to comment.