use of com.microsoft.identity.common.internal.result.IBrokerResultAdapter in project microsoft-authentication-library-common-for-android by AzureAD.
the class BrokerActivity method returnsExceptionOnActivityUnexpectedlyKilled.
private void returnsExceptionOnActivityUnexpectedlyKilled() {
final IBrokerResultAdapter resultAdapter = BrokerResultAdapterFactory.getBrokerResultAdapter(SdkType.MSAL);
final Bundle resultBundle = resultAdapter.bundleFromBaseException(new ClientException(ErrorStrings.BROKER_REQUEST_CANCELLED, "The activity is killed unexpectedly."), null);
final Intent data = new Intent();
data.putExtras(resultBundle);
data.setAction(RETURN_INTERACTIVE_REQUEST_RESULT);
data.putExtra(REQUEST_CODE, AuthenticationConstants.UIRequest.BROWSER_FLOW);
data.putExtra(RESULT_CODE, AuthenticationConstants.UIResponse.BROWSER_CODE_CANCEL);
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(data);
}
Aggregations