When selecting a google account the first time, don't show the

confirm message.
This commit is contained in:
Jimmy Shih
2013-01-29 16:48:52 -08:00
parent 3f173d4434
commit 327336ee10
@@ -99,7 +99,12 @@ public class GoogleSettingsActivity extends AbstractSettingsActivity {
String googleAccount = PreferencesUtils.getString( String googleAccount = PreferencesUtils.getString(
GoogleSettingsActivity.this, R.string.google_account_key, GoogleSettingsActivity.this, R.string.google_account_key,
PreferencesUtils.GOOGLE_ACCOUNT_DEFAULT); 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(); Bundle newBundle = new Bundle();
newBundle.putString(ACCOUNT_NAME_KEY, newGoogleAccount); newBundle.putString(ACCOUNT_NAME_KEY, newGoogleAccount);
showDialog(DIALOG_CONFIRM_SWITCH_ACCOUNT, newBundle); showDialog(DIALOG_CONFIRM_SWITCH_ACCOUNT, newBundle);