// Convert the favoriteIcon Bitmap to a byte array.
ByteArrayOutputStream favoriteIconByteArrayOutputStream = new ByteArrayOutputStream();
// `0` is for lossless compression (the only option for a PNG).
- MainWebViewActivity.favoriteIcon.compress(Bitmap.CompressFormat.PNG, 0, favoriteIconByteArrayOutputStream);
+ MainWebViewActivity.favoriteIconBitmap.compress(Bitmap.CompressFormat.PNG, 0, favoriteIconByteArrayOutputStream);
byte[] favoriteIconByteArray = favoriteIconByteArrayOutputStream.toByteArray();
// Display the new bookmark below the current items in the (0 indexed) list.
BitmapDrawable folderIconBitmapDrawable = (BitmapDrawable) folderIconDrawable;
folderIconBitmap = folderIconBitmapDrawable.getBitmap();
} else { // Assign `favoriteIcon` from the `WebView`.
- folderIconBitmap = MainWebViewActivity.favoriteIcon;
+ folderIconBitmap = MainWebViewActivity.favoriteIconBitmap;
}
// Convert `folderIconBitmap` to a byte array. `0` is for lossless compression (the only option for a PNG).
bookmarksDatabaseHelper.updateBookmark(selectedBookmarkDatabaseId, bookmarkNameString, bookmarkUrlString);
} else { // Update the bookmark using the `WebView` favorite icon.
ByteArrayOutputStream newFavoriteIconByteArrayOutputStream = new ByteArrayOutputStream();
- MainWebViewActivity.favoriteIcon.compress(Bitmap.CompressFormat.PNG, 0, newFavoriteIconByteArrayOutputStream);
+ MainWebViewActivity.favoriteIconBitmap.compress(Bitmap.CompressFormat.PNG, 0, newFavoriteIconByteArrayOutputStream);
byte[] newFavoriteIconByteArray = newFavoriteIconByteArrayOutputStream.toByteArray();
// Update the bookmark and the favorite icon.
BitmapDrawable folderIconBitmapDrawable = (BitmapDrawable) folderIconDrawable;
folderIconBitmap = folderIconBitmapDrawable.getBitmap();
} else { // Get the web page icon `ImageView` from the `Dialog`.
- folderIconBitmap = MainWebViewActivity.favoriteIcon;
+ folderIconBitmap = MainWebViewActivity.favoriteIconBitmap;
}
// Convert the folder `Bitmap` to a byte array. `0` is for lossless compression (the only option for a PNG).