@Test public void testAddAccount() throws NetworkErrorException { Bundle actual = authenticator.addAccount(mock(AccountAuthenticatorResponse.class), BuildConfig.APPLICATION_ID, null, null, null); assertThat(actual).hasKey(AccountManager.KEY_INTENT); Intent actualIntent = actual.getParcelable(AccountManager.KEY_INTENT); assertThat(actualIntent) .hasComponent(RuntimeEnvironment.application, LoginActivity.class) .hasExtra(LoginActivity.EXTRA_ADD_ACCOUNT, true); }
@Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { Intent intent = new Intent(mContext, LoginActivity.class); intent.putExtra(LoginActivity.EXTRA_ADD_ACCOUNT, true); Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; }
AccountAuthenticator extends EmptyAccountAuthenticator { @Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { Intent intent = new Intent(mContext, LoginActivity.class); intent.putExtra(LoginActivity.EXTRA_ADD_ACCOUNT, true); Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; } }
AccountAuthenticator extends EmptyAccountAuthenticator { @Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { Intent intent = new Intent(mContext, LoginActivity.class); intent.putExtra(LoginActivity.EXTRA_ADD_ACCOUNT, true); Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; } AccountAuthenticator(Context context); }
AccountAuthenticator extends EmptyAccountAuthenticator { @Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { Intent intent = new Intent(mContext, LoginActivity.class); intent.putExtra(LoginActivity.EXTRA_ADD_ACCOUNT, true); Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; } AccountAuthenticator(Context context); @Override Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options); }
AccountAuthenticator extends EmptyAccountAuthenticator { @Override public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { Intent intent = new Intent(mContext, LoginActivity.class); intent.putExtra(LoginActivity.EXTRA_ADD_ACCOUNT, true); Bundle bundle = new Bundle(); bundle.putParcelable(AccountManager.KEY_INTENT, intent); return bundle; } AccountAuthenticator(Context context); @Override Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options);  }