- // Get the variables from the bundle.
- pinnedSslCertificate = getArguments().getBoolean("Pinned_SSL_Certificate");
- pinnedIpAddresses = getArguments().getBoolean("Pinned_IP_Addresses");
+ // 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;
+
+ // Store the default icon bitmap.
+ Bitmap defaultFavoriteIconBitmap = defaultFavoriteIconBitmapDrawable.getBitmap();