Source:
<code>public Intent getIntentForBrokerActivity(final AuthenticationRequest request, final BrokerEvent brokerEvent) throws AuthenticationException { final String methodName = ":getIntentForBrokerActivity"; final Bundle requestBundle = getBrokerOptions(request); final Intent intent; if (isBrokerAccountServiceSupported()) { intent = BrokerAccountServiceHandler.getInstance().getIntentForInteractiveRequest(mContext, brokerEvent); if (intent == null) { Logger.e(TAG, "Received null intent from broker interactive request.", null, ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING); final AuthenticationException authenticationException = new AuthenticationException(ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING, "Received null intent from broker interactive request."); <START> brokerEvent.setBrokerAccountServiceConnectionErrorInfo(authenticationException); <END> throw authenticationException; } else { intent.putExtras(requestBundle); } } else { intent = getIntentForBrokerActivityFromAccountManager(requestBundle); } if (intent != null) { intent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); if (!isBrokerWithPRTSupport(intent) && PromptBehavior.FORCE_PROMPT == request.getPrompt()) { Logger.v(TAG + methodName, "FORCE_PROMPT is set for broker auth via old version of broker app, reset to ALWAYS."); intent.putExtra(AuthenticationConstants.Broker.ACCOUNT_PROMPT, PromptBehavior.Always.name()); } } return intent; }</code><technical_language>setBrokerAccountServiceConnectionErrorInfo [](start = 28, length = 42) this - example for Bound Service case</technical_language>

Target:
public Intent getIntentForBrokerActivity(final AuthenticationRequest request, final BrokerEvent brokerEvent) throws AuthenticationException { setBrokerInstallationStatuses(brokerEvent); final String methodName = ":getIntentForBrokerActivity"; final Bundle requestBundle = getBrokerOptions(request); final Intent intent; if (isBrokerAccountServiceSupported()) { intent = BrokerAccountServiceHandler.getInstance().getIntentForInteractiveRequest(mContext, brokerEvent); if (intent == null) { Logger.e(TAG, "Received null intent from broker interactive request.", null, ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING); final AuthenticationException authenticationException = new AuthenticationException(ADALError.BROKER_AUTHENTICATOR_NOT_RESPONDING, "Received null intent from broker interactive request."); brokerEvent.setBrokerAccountServiceConnectionErrorInfo(authenticationException); brokerEvent.setBrokerError(BrokerEvent.BrokerError.BROKER_INTENT_MALFORMED_OR_NULL); throw authenticationException; } else { intent.putExtras(requestBundle); } } else { intent = getIntentForBrokerActivityFromAccountManager(requestBundle); } if (intent != null) { intent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); if (!isBrokerWithPRTSupport(intent) && PromptBehavior.FORCE_PROMPT == request.getPrompt()) { Logger.v(TAG + methodName, "FORCE_PROMPT is set for broker auth via old version of broker app, reset to ALWAYS."); intent.putExtra(AuthenticationConstants.Broker.ACCOUNT_PROMPT, PromptBehavior.Always.name()); } } return intent; }