intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);\r
intent.putExtra(KEY_REQUIRED_FEATURES, requiredFeatures);\r
intent.putExtra(KEY_LOGIN_OPTIONS, options);\r
+ intent.putExtra(AuthenticatorActivity.EXTRA_ACTION, AuthenticatorActivity.ACTION_CREATE);\r
\r
setIntentFlags(intent);\r
\r
return result;\r
}\r
\r
- /// if not stored, return Intent to access the AuthenticatorActivity\r
+ /// if not stored, return Intent to access the AuthenticatorActivity and UPDATE the token for the account\r
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);\r
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);\r
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);\r
intent.putExtra(KEY_LOGIN_OPTIONS, options);\r
intent.putExtra(AuthenticatorActivity.EXTRA_ACCOUNT, account);\r
+ intent.putExtra(AuthenticatorActivity.EXTRA_ACTION, AuthenticatorActivity.ACTION_UPDATE_TOKEN);\r
+ \r
\r
final Bundle bundle = new Bundle();\r
bundle.putParcelable(AccountManager.KEY_INTENT, intent);\r
\r
private void setIntentFlags(Intent intent) {\r
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r
- intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\r
- intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); // incompatible with the authorization code grant in OAuth\r
+ //intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\r
+ //intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); // incompatible with the authorization code grant in OAuth\r
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);\r
intent.addFlags(Intent.FLAG_FROM_BACKGROUND);\r
}\r