summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserBookmarksAdapter.java
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-09-17 16:57:40 +0100
committerBen Murdoch <benm@google.com>2009-09-24 21:30:24 +0100
commitaac7aa6fcfcb519755987ec126be066323f589c8 (patch)
treea6a48f5e8055dcfa0c45eae96002aad4557e605c /src/com/android/browser/BrowserBookmarksAdapter.java
parentc6fa1104e549b8f5b89195d22c41059e77672dfa (diff)
downloadpackages_apps_browser-aac7aa6fcfcb519755987ec126be066323f589c8.zip
packages_apps_browser-aac7aa6fcfcb519755987ec126be066323f589c8.tar.gz
packages_apps_browser-aac7aa6fcfcb519755987ec126be066323f589c8.tar.bz2
In the case of a page load error, save a second screenshot in onProgressChanged(100) to ensure that we save the substituted error page rather than the previous page that loaded. Also save the thumbnail for the page if the user creates the bookmark through the add bookmark menu or clicking the add bookmark icon on the bookmarks page.
Change-Id: Ib2b7692a45290f9ce372968e05cde8f6903e4572
Diffstat (limited to 'src/com/android/browser/BrowserBookmarksAdapter.java')
-rw-r--r--src/com/android/browser/BrowserBookmarksAdapter.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index 6b464cc..bbecab9 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -437,13 +437,11 @@ class BrowserBookmarksAdapter extends BaseAdapter {
mCursor.moveToPosition(position - mExtraOffset);
tv.setText(mCursor.getString(
Browser.HISTORY_PROJECTION_TITLE_INDEX));
- byte[] data = mCursor.getBlob(
- Browser.HISTORY_PROJECTION_THUMBNAIL_INDEX);
- if (data == null) {
+ Bitmap thumbnail = getBitmap(Browser.HISTORY_PROJECTION_THUMBNAIL_INDEX, position);
+ if (thumbnail == null) {
thumb.setImageResource(R.drawable.ic_launcher_shortcut_browser_bookmark);
} else {
- thumb.setImageBitmap(
- BitmapFactory.decodeByteArray(data, 0, data.length));
+ thumb.setImageBitmap(thumbnail);
}
return convertView;