- // Populate `urlArrayList` and `iconArrayList` from `webBackForwardList`.
- for (int i=0; i < webBackForwardList.getSize(); i++) {
- // Store the URL.
- urlArrayList.add(webBackForwardList.getItemAtIndex(i).getUrl());
-
- // Create a variable to store the icon `Bitmap`.
- Bitmap iconBitmap;
-
- // Store the icon `Bitmap`.
- if (webBackForwardList.getItemAtIndex(i).getFavicon() == null) {
- // If `webBackForwardList` does not have a favorite icon, use Privacy Browser's default world icon.
- iconBitmap = defaultFavoriteIcon;
- } else { // Get the icon from `webBackForwardList`.
- iconBitmap = webBackForwardList.getItemAtIndex(i).getFavicon();
- }