- String password = AccountManager.get(context).getPassword(account);
- //String password = am.blockingGetAuthToken(mAccount, AccountAuthenticator.AUTH_TOKEN_TYPE, true);
+ /*if (ama.getUserData(account, AccountAuthenticator.KEY_SUPPORTS_OAUTH2)) {
+ // TODO - this is a trap; the OAuth access token shouldn't be saved as the account password
+ String accessToken = AccountManager.get(context).getPassword(account);
+ client.setCredentials("bearer", accessToken);