Code example for AccountManagerFuture

Methods: getResult

0
    private PendingIntent mPendingIntent;
 
    private AccountManagerCallback<Bundle> mCallback = new AccountManagerCallback<Bundle>() {
        public void run(AccountManagerFuture<Bundle> future) { 
            try { 
                Bundle bundle = future.getResult(); 
                bundle.keySet(); 
                setResult(RESULT_OK); 
 
                if (mPendingIntent != null) { 
                    mPendingIntent.cancel(); 
                } 
 
                if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "account added: " + bundle); 
            } catch (OperationCanceledException e) { 
                if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "addAccount was canceled"); 
            } catch (IOException e) { 
                if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "addAccount failed: " + e); 
            } catch (AuthenticatorException e) { 
                if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "addAccount failed: " + e); 
            } finally {