public final AccountManagerFuture<Bundle> start() { try { doWork(); } catch (RemoteException e) { setException(e); } return this; }
@Override public Bundle getResult() throws OperationCanceledException, IOException, AuthenticatorException { return internalGetResult(null, null); }
@Override public void onResult(Bundle bundle) { Intent intent = bundle.getParcelable(KEY_INTENT); if (intent != null && mActivity != null) { // since the user provided an Activity we will silently start intents // that we see mActivity.startActivity(intent); // leave the Future running to wait for the real response to this request } else if (bundle.getBoolean("retry")) { try { doWork(); } catch (RemoteException e) { throw new RuntimeException(e); } } else { set(bundle); } }
@Override protected void done() { if (mCallback != null) { postToHandler(mHandler, mCallback, this); } }
@Override public void onError(int code, String message) { if (code == ERROR_CODE_CANCELED || code == ERROR_CODE_USER_RESTRICTED || code == ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE) { // the authenticator indicated that this request was canceled or we were // forbidden to fulfill; cancel now cancel(true /* mayInterruptIfRunning */); return; } setException(convertErrorToException(code, message)); } }
@Override public void onResult(Bundle bundle) { Intent intent = bundle.getParcelable(KEY_INTENT); if (intent != null && mActivity != null) { // since the user provided an Activity we will silently start intents // that we see mActivity.startActivity(intent); // leave the Future running to wait for the real response to this request } else if (bundle.getBoolean("retry")) { try { doWork(); } catch (RemoteException e) { throw new RuntimeException(e); } } else { set(bundle); } }
@Override protected void done() { if (mCallback != null) { postToHandler(mHandler, mCallback, this); } }
@Override public void onError(int code, String message) { if (code == ERROR_CODE_CANCELED || code == ERROR_CODE_USER_RESTRICTED || code == ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE) { // the authenticator indicated that this request was canceled or we were // forbidden to fulfill; cancel now cancel(true /* mayInterruptIfRunning */); return; } setException(convertErrorToException(code, message)); } }
public final AccountManagerFuture<Bundle> start() { try { doWork(); } catch (RemoteException e) { setException(e); } return this; }
@Override public void onResult(Bundle bundle) { Intent intent = bundle.getParcelable(KEY_INTENT); if (intent != null && mActivity != null) { // since the user provided an Activity we will silently start intents // that we see mActivity.startActivity(intent); // leave the Future running to wait for the real response to this request } else if (bundle.getBoolean("retry")) { try { doWork(); } catch (RemoteException e) { throw new RuntimeException(e); } } else { set(bundle); } }
@Override public Bundle getResult(long timeout, TimeUnit unit) throws OperationCanceledException, IOException, AuthenticatorException { return internalGetResult(timeout, unit); }
@Override protected void done() { if (mCallback != null) { postToHandler(mHandler, mCallback, this); } }
@Override public void onError(int code, String message) { if (code == ERROR_CODE_CANCELED || code == ERROR_CODE_USER_RESTRICTED || code == ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE) { // the authenticator indicated that this request was canceled or we were // forbidden to fulfill; cancel now cancel(true /* mayInterruptIfRunning */); return; } setException(convertErrorToException(code, message)); } }
public final AccountManagerFuture<Bundle> start() { try { doWork(); } catch (RemoteException e) { setException(e); } return this; }
@Override public Bundle getResult(long timeout, TimeUnit unit) throws OperationCanceledException, IOException, AuthenticatorException { return internalGetResult(timeout, unit); }
@Override public Bundle getResult() throws OperationCanceledException, IOException, AuthenticatorException { return internalGetResult(null, null); }
@Override public Bundle getResult(long timeout, TimeUnit unit) throws OperationCanceledException, IOException, AuthenticatorException { return internalGetResult(timeout, unit); }