summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-06-05 16:52:42 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-05 16:52:42 -0700
commitd586d22de1dddb6c595727e87f3cd64e38501692 (patch)
treeb7113ca58e188d55e2be06a05c3a3c2aa27269e7 /src
parent80f6d0574a9655fac3bd219afcb1810d0f66a57f (diff)
parent1df6df7e33601f1dcd6358a1eea9c34bc6373927 (diff)
downloadpackages_apps_browser-d586d22de1dddb6c595727e87f3cd64e38501692.zip
packages_apps_browser-d586d22de1dddb6c595727e87f3cd64e38501692.tar.gz
packages_apps_browser-d586d22de1dddb6c595727e87f3cd64e38501692.tar.bz2
am 1df6df7e: Don\'t show stale thumbnails
* commit '1df6df7e33601f1dcd6358a1eea9c34bc6373927': Don't show stale thumbnails
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserBookmarksAdapter.java3
-rw-r--r--src/com/android/browser/BrowserBookmarksAdapterItem.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index afc28ba..5747112 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -93,7 +93,7 @@ public class BrowserBookmarksAdapter extends
thumb.setBackground(null);
} else {
thumb.setScaleType(ScaleType.CENTER_CROP);
- if (item.thumbnail == null) {
+ if (item.thumbnail == null || !item.has_thumbnail) {
thumb.setImageResource(R.drawable.browser_thumbnail);
} else {
thumb.setImageDrawable(item.thumbnail);
@@ -111,6 +111,7 @@ public class BrowserBookmarksAdapter extends
Bitmap thumbnail = item.thumbnail != null ? item.thumbnail.getBitmap() : null;
thumbnail = BrowserBookmarksPage.getBitmap(c,
BookmarksLoader.COLUMN_INDEX_THUMBNAIL, thumbnail);
+ item.has_thumbnail = thumbnail != null;
if (thumbnail != null
&& (item.thumbnail == null || item.thumbnail.getBitmap() != thumbnail)) {
item.thumbnail = new BitmapDrawable(mContext.getResources(), thumbnail);
diff --git a/src/com/android/browser/BrowserBookmarksAdapterItem.java b/src/com/android/browser/BrowserBookmarksAdapterItem.java
index 64b1ca2..6b99578 100644
--- a/src/com/android/browser/BrowserBookmarksAdapterItem.java
+++ b/src/com/android/browser/BrowserBookmarksAdapterItem.java
@@ -21,5 +21,6 @@ public class BrowserBookmarksAdapterItem {
public String url;
public CharSequence title;
public BitmapDrawable thumbnail;
+ public boolean has_thumbnail;
public boolean is_folder;
}