From 7dd30cb0bd011e5fbd817fa64863b4c266dd76b7 Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 17 Feb 2011 12:43:33 -0800 Subject: Fix shouldUpdateImage check Bug: 3466212 Also added a test case to check for regressions Change-Id: I9a8979a0ced165f1c94945c62687b0bf3b7076fe --- src/com/android/browser/provider/BrowserProvider2.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/com/android/browser/provider') diff --git a/src/com/android/browser/provider/BrowserProvider2.java b/src/com/android/browser/provider/BrowserProvider2.java index 10b3821..3033db4 100644 --- a/src/com/android/browser/provider/BrowserProvider2.java +++ b/src/com/android/browser/provider/BrowserProvider2.java @@ -1441,6 +1441,9 @@ public class BrowserProvider2 extends SQLiteContentProvider { byte[] cthumb = null; byte[] ctouch = null; try { + if (cursor.getCount() <= 0) { + return nfavicon != null || nthumb != null || ntouch != null; + } while (cursor.moveToNext()) { if (nfavicon != null) { cfavicon = cursor.getBlob(0); -- cgit v1.1