Code example for NetworkErrorException

0
		final String password = AccountManager.get(mContext).getPassword(account);		
		final String token = AuthTokenLoader.downloadToken(account.name, password);
		 
		//Have we received a token? 
		if (token == null){
			throw new NetworkErrorException();
		} 
		 
		//Build response 
		final Bundle bundle = new Bundle();
		bundle.putString(AccountManager.KEY_ACCOUNT_NAME, account.name);
		bundle.putString(AccountManager.KEY_ACCOUNT_TYPE, account.type);
		bundle.putString(AccountManager.KEY_AUTHTOKEN, token);
		 
		return bundle;
	} 
 
	@Override 
	public String getAuthTokenLabel(String authTokenType) {
		// TODO Auto-generated method stub 
Experience pair programming with AI  Get Codota for Java