From c95261955cf08f30b484b6a229c4bcff42c645ce Mon Sep 17 00:00:00 2001 From: Andrei Popescu Date: Wed, 23 Sep 2009 15:52:16 +0100 Subject: Make the deletion of bookmarks depend on both title and URL Fixes http://b/issue?id=2134421 --- src/com/android/browser/Bookmarks.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/com/android/browser/Bookmarks.java') diff --git a/src/com/android/browser/Bookmarks.java b/src/com/android/browser/Bookmarks.java index a3dc919..40aaa63 100644 --- a/src/com/android/browser/Bookmarks.java +++ b/src/com/android/browser/Bookmarks.java @@ -162,17 +162,17 @@ import java.util.Date; * @param url URL of the website to be removed. */ /* package */ static void removeFromBookmarks(Context context, - ContentResolver cr, String url) { + ContentResolver cr, String url, String title) { Cursor cursor = cr.query( Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION, - "url = ?", - new String[] { url }, + "url = ? AND title = ?", + new String[] { url, title }, null); boolean first = cursor.moveToFirst(); // Should be in the database no matter what if (!first) { - throw new AssertionError("URL is not in the database!"); + throw new AssertionError("URL is not in the database! " + url + " " + title); } // Remove from bookmarks WebIconDatabase.getInstance().releaseIconForPageUrl(url); -- cgit v1.1