AccountManagerHelper function ( Context arg0 ) { synchronized ( lock ) { if ( sAccountManagerHelper == null ) { sAccountManagerHelper = new AccountManagerHelper ( arg0 , new SystemAccountManagerDelegate ( arg0 ) ) ; } } return sAccountManagerHelper ; }
a factory method for the accountmanagerhelper . it is possible to override the accountmanager to use in tests for the instance of the accountmanagerhelper by calling overrideaccountmanagerhelperfortests ... with your mockaccountmanager . concode_field_sep String mAuthTokenType concode_elem_sep AtomicBoolean mErrorEncountered concode_elem_sep Context mApplicationContext concode_elem_sep int MAX_TRIES concode_elem_sep String TAG concode_elem_sep String GOOGLE_ACCOUNT_TYPE concode_elem_sep AccountManagerHelper sAccountManagerHelper concode_elem_sep AccountManagerDelegate mAccountManager concode_elem_sep GetAuthTokenCallback mCallback concode_elem_sep Account mAccount concode_elem_sep Object lock concode_elem_sep AtomicInteger mNumTries concode_field_sep void overrideAccountManagerHelperForTests concode_elem_sep void getAuthTokenAsynchronously concode_elem_sep boolean hasGoogleAccountAuthenticator concode_elem_sep String getNewAuthToken concode_elem_sep List<String> getGoogleAccountNames concode_elem_sep String getAuthTokenInner concode_elem_sep void getNewAuthTokenFromForeground concode_elem_sep Account createAccountFromName concode_elem_sep void onConnectionTypeChanged concode_elem_sep boolean hasGoogleAccounts concode_elem_sep Account getAccountFromName concode_elem_sep Account[] getGoogleAccounts concode_elem_sep String getAuthTokenFromBackground concode_elem_sep void invalidateAuthToken concode_elem_sep void tokenAvailable concode_elem_sep void getAuthTokenFromForeground