@@ -86,8 +86,7 @@ private static Account[] getAccounts(final AccountManager manager)
8686 throws OperationCanceledException , AuthenticatorException ,
8787 IOException {
8888 final AccountManagerFuture <Account []> future = manager
89- .getAccountsByTypeAndFeatures (ACCOUNT_TYPE , null , null ,
90- null );
89+ .getAccountsByTypeAndFeatures (ACCOUNT_TYPE , null , null , null );
9190 final Account [] accounts = future .getResult ();
9291 return accounts != null ? accounts : new Account [0 ];
9392 }
@@ -114,14 +113,18 @@ public static Account getAccount(final AccountManager manager,
114113 if (loggable )
115114 Log .d (TAG , "No GitHub accounts for activity=" + activity );
116115
117- Bundle result = manager .addAccount (ACCOUNT_TYPE , null ,
118- null , null , activity , null , null ).getResult ();
116+ Bundle result = manager .addAccount (ACCOUNT_TYPE , null , null ,
117+ null , activity , null , null ).getResult ();
119118
120119 if (loggable )
121120 Log .d (TAG ,
122121 "Added account "
123122 + result .getString (KEY_ACCOUNT_NAME ));
124123 }
124+ } catch (OperationCanceledException e ) {
125+ Log .d (TAG , "Excepting retrieving account" , e );
126+ activity .finish ();
127+ throw new RuntimeException (e );
125128 } catch (AccountsException e ) {
126129 Log .d (TAG , "Excepting retrieving account" , e );
127130 throw new RuntimeException (e );
0 commit comments