- // Remove the incorrect lint warning that `getActivity()` might be null.
- assert getActivity() != null;
+ // Get the arguments.
+ Bundle arguments = getArguments();
+
+ // Remove the incorrect lint warning below that `.getArguments().getInt()` might be null.
+ assert arguments != null;
+
+ // Get the current position of this WebView fragment.
+ int webViewPosition = MainWebViewActivity.webViewPagerAdapter.getPositionForId(arguments.getLong("webview_fragment_id"));
+
+ // 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;