From 327336ee100b9539fdc6782710af6a2120486c3b Mon Sep 17 00:00:00 2001 From: Jimmy Shih Date: Tue, 29 Jan 2013 16:48:52 -0800 Subject: [PATCH] When selecting a google account the first time, don't show the confirm message. --- .../apps/mytracks/settings/GoogleSettingsActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MyTracks/src/com/google/android/apps/mytracks/settings/GoogleSettingsActivity.java b/MyTracks/src/com/google/android/apps/mytracks/settings/GoogleSettingsActivity.java index cfda6677b..56bfe7cc0 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/settings/GoogleSettingsActivity.java +++ b/MyTracks/src/com/google/android/apps/mytracks/settings/GoogleSettingsActivity.java @@ -99,7 +99,12 @@ public class GoogleSettingsActivity extends AbstractSettingsActivity { String googleAccount = PreferencesUtils.getString( GoogleSettingsActivity.this, R.string.google_account_key, PreferencesUtils.GOOGLE_ACCOUNT_DEFAULT); - if (!newGoogleAccount.equals(googleAccount)) { + if (googleAccount == null + || googleAccount.equals(PreferencesUtils.GOOGLE_ACCOUNT_DEFAULT)) { + updateUiByAccountName(newGoogleAccount); + return true; + } + if (!googleAccount.equals(newGoogleAccount)) { Bundle newBundle = new Bundle(); newBundle.putString(ACCOUNT_NAME_KEY, newGoogleAccount); showDialog(DIALOG_CONFIRM_SWITCH_ACCOUNT, newBundle);