- // Remove the incorrect lint warnings that `getString()` might be null.
- assert getArguments() != null;
+ // Get a handle for the arguments.
+ Bundle arguments = getArguments();
+
+ // Remove the incorrect lint warning below that arguments might be null.
+ assert arguments != null;
+
+ // Get the variables from the bundle.
+ String httpAuthHost = arguments.getString("host");
+ String httpAuthRealm = arguments.getString("realm");
+ long webViewFragmentId = arguments.getLong("webview_fragment_id");
+
+ // Get the current position of this WebView fragment.
+ int webViewPosition = MainWebViewActivity.webViewPagerAdapter.getPositionForId(webViewFragmentId);
+
+ // Get the WebView tab fragment.
+ WebViewTabFragment webViewTabFragment = MainWebViewActivity.webViewPagerAdapter.getPageFragment(webViewPosition);
+
+ // Get the fragment view.
+ View fragmentView = webViewTabFragment.getView();
+
+ // Remove the incorrect lint warning below that the fragment view might be null.
+ assert fragmentView != null;