- // Remove the incorrect lint warning below that `.getArguments.getBoolean()` might be null.
- assert getArguments() != null;
+ // Get the context.
+ Context context = getContext();
+
+ // Remove the incorrect lint warning below that the context might be null.
+ assert context != null;
+
+ // Get the favorite icon.
+ Bitmap favoriteIconBitmap = nestedScrollWebView.getFavoriteOrDefaultIcon();
+
+ // Get the default favorite icon drawable. `ContextCompat` must be used until API >= 21.
+ Drawable defaultFavoriteIconDrawable = ContextCompat.getDrawable(context, R.drawable.world);
+
+ // Cast the favorite icon drawable to a bitmap drawable.
+ BitmapDrawable defaultFavoriteIconBitmapDrawable = (BitmapDrawable) defaultFavoriteIconDrawable;
+
+ // Remove the incorrect warning below that the favorite icon bitmap drawable might be null.
+ assert defaultFavoriteIconBitmapDrawable != null;