accountmanager 调用说明

增加账户代码说明,

public AccountManagerFuture<Bundle> addAccount(final String accountType,
final String authTokenType, final String[] requiredFeatures,
final Bundle addAccountOptions,
final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler)
会调用Response这个函数进行执行,进行创建service,这个service自动调用打开activiy对话框。
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
mService.addAccount(mResponse, accountType, authTokenType,
requiredFeatures, activity != null, optionsIn);
}
}.start();


调用accountManager的AddAccount-》AccountManagerService的addAccount-》打开service
Response对象在accountManager中创建的,在accountManagerServie中进行二次继承



posted on 2018-01-09 13:58  tistar  阅读(210)  评论(0编辑  收藏  举报