- // Remove the incorrect lint warning that `getArguments()` might be null.
- assert getArguments() != null;
-
- // Get the components of the SSL error message from the bundle.
- int primaryErrorInt = getArguments().getInt("PrimaryErrorInt");
- String urlWithErrors = getArguments().getString("UrlWithError");
- String issuedToCName = getArguments().getString("IssuedToCName");
- String issuedToOName = getArguments().getString("IssuedToOName");
- String issuedToUName = getArguments().getString("IssuedToUName");
- String issuedByCName = getArguments().getString("IssuedByCName");
- String issuedByOName = getArguments().getString("IssuedByOName");
- String issuedByUName = getArguments().getString("IssuedByUName");
- String startDate = getArguments().getString("StartDate");
- String endDate = getArguments().getString("EndDate");
+ // Get a handle for the arguments.
+ Bundle arguments = getArguments();
+
+ // Remove the incorrect lint warning that the arguments might be null.
+ assert arguments != null;
+
+ // Get the variables from the bundle.
+ int primaryErrorInt = arguments.getInt("primary_error_int");
+ String urlWithErrors = arguments.getString("url_with_error");
+ String issuedToCName = arguments.getString("issued_to_cname");
+ String issuedToOName = arguments.getString("issued_to_oname");
+ String issuedToUName = arguments.getString("issued_to_uname");
+ String issuedByCName = arguments.getString("issued_by_cname");
+ String issuedByOName = arguments.getString("issued_by_oname");
+ String issuedByUName = arguments.getString("issued_by_uname");
+ String startDate = arguments.getString("start_date");
+ String endDate = arguments.getString("end_date");
+ 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;
+
+ // Get a handle for the current WebView.
+ NestedScrollWebView nestedScrollWebView = fragmentView.findViewById(R.id.nestedscroll_webview);
+
+ // Get a handle for the SSL error handler.
+ SslErrorHandler sslErrorHandler = nestedScrollWebView.getSslErrorHandler();