Fix browser crash on high resolution device while adding bookmark
The bitmap of page was being sent as part of intent. The binder
was throwing an exception due to large size of bitmap. Removed
the bitmap from intent and added a static method in Controller
to expose the bitmap object.
CR-Fixed: SWE-4171
Change-Id: I9000b3ffa83e2846881fef5486bee07479a7b2ce
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index e52d3f0..13c3d16 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -1056,6 +1056,9 @@
if (urlUnmodified) {
thumbnail = (Bitmap) mMap.getParcelable(
BrowserContract.Bookmarks.THUMBNAIL);
+ if (thumbnail == null) {
+ thumbnail = Controller.getAndReleaseLastBookmarkBitmapFromIntent();
+ }
favicon = (Bitmap) mMap.getParcelable(
BrowserContract.Bookmarks.FAVICON);
} else {