diff options
Diffstat (limited to 'src/com/android/browser/BrowserProvider.java')
-rw-r--r-- | src/com/android/browser/BrowserProvider.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/browser/BrowserProvider.java b/src/com/android/browser/BrowserProvider.java index bf1f9d5..1eec52b 100644 --- a/src/com/android/browser/BrowserProvider.java +++ b/src/com/android/browser/BrowserProvider.java @@ -465,7 +465,7 @@ public class BrowserProvider extends ContentProvider { public MySuggestionCursor(Cursor hc, Cursor sc, String string) { mHistoryCursor = hc; mSuggestCursor = sc; - mHistoryCount = hc.getCount(); + mHistoryCount = hc != null ? hc.getCount() : 0; mSuggestionCount = sc != null ? sc.getCount() : 0; if (mSuggestionCount > (MAX_SUGGESTION_LONG_ENTRIES - mHistoryCount)) { mSuggestionCount = MAX_SUGGESTION_LONG_ENTRIES - mHistoryCount; @@ -846,8 +846,7 @@ public class BrowserProvider extends ContentProvider { String suggestSelection; String [] myArgs; if (selectionArgs[0] == null || selectionArgs[0].equals("")) { - suggestSelection = null; - myArgs = null; + return new MySuggestionCursor(null, null, ""); } else { String like = selectionArgs[0] + "%"; if (selectionArgs[0].startsWith("http") |