Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final LoginOptions loginOptions = LoginOptions.fromBundle(getIntent().getExtras()); getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); <START> authConfigReady = new ArrayBlockingQueue<>(1); <END> (new AuthConfigTask(this)).execute(); try { authConfigReady.take(); } catch (InterruptedException e) { SalesforceSDKLogger.e(TAG, "Exception occurred while fetching auth config", e); } setContentView(R.layout.sf__login); if (SalesforceSDKManager.getInstance().isIDPLoginFlowEnabled()) { final Button button = findViewById(R.id.sf__idp_login_button); button.setVisibility(View.VISIBLE); } final WebView webView = findViewById(R.id.sf__oauth_webview); final WebSettings webSettings = webView.getSettings(); webSettings.setUseWideViewPort(true); webSettings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL); webSettings.setJavaScriptEnabled(true); webSettings.setAllowFileAccessFromFileURLs(true); webSettings.setJavaScriptCanOpenWindowsAutomatically(true); webSettings.setDatabaseEnabled(true); webSettings.setDomStorageEnabled(true); EventsObservable.get().notifyEvent(EventType.AuthWebViewCreateComplete, webView); webviewHelper = getOAuthWebviewHelper(this, loginOptions, webView, savedInstanceState); EventsObservable.get().notifyEvent(EventType.LoginActivityCreateComplete, this); certAuthOrLogin(); if (!receiverRegistered) { changeServerReceiver = new ChangeServerReceiver(); final IntentFilter changeServerFilter = new IntentFilter(ServerPickerActivity.CHANGE_SERVER_INTENT); registerReceiver(changeServerReceiver, changeServerFilter); receiverRegistered = true; } authCallback = new SPAuthCallback(); }</code><technical_language>move test for production sandbox create a AuthConfigTask if is auth config expected</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final LoginOptions loginOptions = LoginOptions.fromBundle(getIntent().getExtras()); getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); try { (new AuthConfigTask(null)).execute().get(); } catch (Exception e) { SalesforceSDKLogger.e(TAG, "Exception occurred while fetching auth config", e); } setContentView(R.layout.sf__login); if (SalesforceSDKManager.getInstance().isIDPLoginFlowEnabled()) { final Button button = findViewById(R.id.sf__idp_login_button); button.setVisibility(View.VISIBLE); } final WebView webView = findViewById(R.id.sf__oauth_webview); final WebSettings webSettings = webView.getSettings(); webSettings.setUseWideViewPort(true); webSettings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL); webSettings.setJavaScriptEnabled(true); webSettings.setAllowFileAccessFromFileURLs(true); webSettings.setJavaScriptCanOpenWindowsAutomatically(true); webSettings.setDatabaseEnabled(true); webSettings.setDomStorageEnabled(true); EventsObservable.get().notifyEvent(EventType.AuthWebViewCreateComplete, webView); webviewHelper = getOAuthWebviewHelper(this, loginOptions, webView, savedInstanceState); EventsObservable.get().notifyEvent(EventType.LoginActivityCreateComplete, this); certAuthOrLogin(); if (!receiverRegistered) { changeServerReceiver = new ChangeServerReceiver(); final IntentFilter changeServerFilter = new IntentFilter(ServerPickerActivity.CHANGE_SERVER_INTENT); registerReceiver(changeServerReceiver, changeServerFilter); receiverRegistered = true; } authCallback = new SPAuthCallback(); }