am 7ac20eec: am afe49c7c: am 794b7e92: account manager api review changes

Merge commit '7ac20eec5af9991a223cff799c8172c4a3073630'

* commit '7ac20eec5af9991a223cff799c8172c4a3073630':
  account manager api review changes
This commit is contained in:
Fred Quintana 2009-10-12 11:28:33 -07:00 committed by Android Git Automerger
commit 7b8f607d64
2 changed files with 9 additions and 16 deletions

View File

@ -23,7 +23,6 @@ import android.accounts.AbstractAccountAuthenticator;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
import android.accounts.AccountManager;
import android.accounts.Constants;
import android.accounts.NetworkErrorException;
import android.app.Service;
import android.content.ContentResolver;
@ -75,8 +74,8 @@ public class EasAuthenticatorService extends Service {
ContactsContract.AUTHORITY, syncContacts);
Bundle b = new Bundle();
b.putString(Constants.ACCOUNT_NAME_KEY, options.getString(OPTIONS_USERNAME));
b.putString(Constants.ACCOUNT_TYPE_KEY, Eas.ACCOUNT_MANAGER_TYPE);
b.putString(AccountManager.KEY_ACCOUNT_NAME, options.getString(OPTIONS_USERNAME));
b.putString(AccountManager.KEY_ACCOUNT_TYPE, Eas.ACCOUNT_MANAGER_TYPE);
return b;
// 2) The other case is that we're creating a new account from an Account manager
// activity. In this case, we add an intent that will be used to gather the
@ -88,25 +87,19 @@ public class EasAuthenticatorService extends Service {
// Add extras that indicate this is an Exchange account creation
// So we'll skip the "account type" activity, and we'll use the response when
// we're done
intent.putExtra(Constants.ACCOUNT_AUTHENTICATOR_RESPONSE_KEY, response);
b.putParcelable(Constants.INTENT_KEY, intent);
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
b.putParcelable(AccountManager.KEY_INTENT, intent);
return b;
}
}
@Override
public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account) {
public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account,
Bundle options) {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean confirmPassword(AccountAuthenticatorResponse response, Account account,
String password) throws NetworkErrorException {
// TODO Auto-generated method stub
return false;
}
@Override
public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) {
return null;
@ -145,7 +138,7 @@ public class EasAuthenticatorService extends Service {
String authenticatorIntent = "android.accounts.AccountAuthenticator";
if (authenticatorIntent.equals(intent.getAction())) {
return new EasAuthenticator(this).getIAccountAuthenticator().asBinder();
return new EasAuthenticator(this).getIBinder();
} else {
return null;
}

View File

@ -44,7 +44,7 @@ import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
import android.accounts.AccountManager;
import android.accounts.OnAccountsUpdatedListener;
import android.accounts.OnAccountsUpdateListener;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.Service;
@ -683,7 +683,7 @@ public class SyncManager extends Service implements Runnable {
}
}
public class EasAccountsUpdatedListener implements OnAccountsUpdatedListener {
public class EasAccountsUpdatedListener implements OnAccountsUpdateListener {
public void onAccountsUpdated(android.accounts.Account[] accounts) {
checkWithAccountManager();
}