Bug 1061337 - Error when bookmarking a link with no title. r=ckitching
authorRichard Newman <rnewman@mozilla.com>
Mon, 01 Sep 2014 17:22:47 -0700
changeset 224563 851cc41545533962170c96ff5431335cdcbb83c3
parent 224562 967b3014896d4fac3fbba9c69182ad99feae9efc
child 224564 903a6dd7c5d0ba7435c111bcefda9965a7ad70a4
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersckitching
bugs1061337
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061337 - Error when bookmarking a link with no title. r=ckitching
mobile/android/base/db/LocalBrowserDB.java
--- a/mobile/android/base/db/LocalBrowserDB.java
+++ b/mobile/android/base/db/LocalBrowserDB.java
@@ -946,17 +946,20 @@ public class LocalBrowserDB {
         String[] args = new String[] { value };
         int updated  = cr.update(mParentsUriWithProfile, values, where, args);
         debug("Updated " + updated + " rows to new modified time.");
     }
 
     private void addBookmarkItem(ContentResolver cr, String title, String uri, long folderId) {
         final long now = System.currentTimeMillis();
         ContentValues values = new ContentValues();
-        values.put(Browser.BookmarkColumns.TITLE, title);
+        if (title != null) {
+            values.put(Browser.BookmarkColumns.TITLE, title);
+        }
+
         values.put(Bookmarks.URL, uri);
         values.put(Bookmarks.PARENT, folderId);
         values.put(Bookmarks.DATE_MODIFIED, now);
 
         // Get the page's favicon ID from the history table
         Cursor c = null;
         try {
             c = cr.query(mHistoryUriWithProfile,