- // Store the current page index.
- int currentPageIndex = webBackForwardList.getCurrentIndex();
-
- // Setup the URL array list and the icon array list.
- ArrayList<String> urlArrayList = new ArrayList<>();
- ArrayList<String> iconBase64StringArrayList = new ArrayList<>();
-
- // Get the default favorite icon drawable. `ContextCompat` must be used until the minimum API >= 21.
- Drawable defaultFavoriteIconDrawable = ContextCompat.getDrawable(context, R.drawable.world);
-
- // Convert the default favorite icon drawable to a `BitmapDrawable`.
- BitmapDrawable defaultFavoriteIconBitmapDrawable = (BitmapDrawable) defaultFavoriteIconDrawable;
-
- // Remove the incorrect lint error that `getBitmap()` might be null.
- assert defaultFavoriteIconBitmapDrawable != null;
-
- // Extract a `Bitmap` from the default favorite icon `BitmapDrawable`.
- Bitmap defaultFavoriteIcon = defaultFavoriteIconBitmapDrawable.getBitmap();
+ // Store the WebView fragment ID in the bundle.
+ argumentsBundle.putLong("webview_fragment_id", webViewFragmentId);