diff options
author | Andrei Popescu <andreip@google.com> | 2009-09-23 15:52:16 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-09-23 15:52:26 +0100 |
commit | c95261955cf08f30b484b6a229c4bcff42c645ce (patch) | |
tree | be50574245f8f186e3049e95c0b82bff576e9afc /src/com/android/browser/Bookmarks.java | |
parent | 5e335a381a0cd66e94117b202c1f34f5cb29c9b8 (diff) | |
download | packages_apps_browser-c95261955cf08f30b484b6a229c4bcff42c645ce.zip packages_apps_browser-c95261955cf08f30b484b6a229c4bcff42c645ce.tar.gz packages_apps_browser-c95261955cf08f30b484b6a229c4bcff42c645ce.tar.bz2 |
Make the deletion of bookmarks depend on both title and URL
Fixes http://b/issue?id=2134421
Diffstat (limited to 'src/com/android/browser/Bookmarks.java')
-rw-r--r-- | src/com/android/browser/Bookmarks.java | 8 |
1 files changed, 4 insertions, 4 deletions
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); |