diff --git a/mobile/android/base/db/BrowserProvider.java.in b/mobile/android/base/db/BrowserProvider.java.in index 9a0eba67ba9..93e5ef66def 100644 --- a/mobile/android/base/db/BrowserProvider.java.in +++ b/mobile/android/base/db/BrowserProvider.java.in @@ -903,11 +903,17 @@ public class BrowserProvider extends ContentProvider { case BOOKMARKS: { trace("Insert on BOOKMARKS: " + uri); + // Generate values if not specified. Don't overwrite + // if specified by caller. long now = System.currentTimeMillis(); - values.put(Bookmarks.DATE_CREATED, now); - values.put(Bookmarks.DATE_MODIFIED, now); + if (!values.containsKey(Bookmarks.DATE_CREATED)) { + values.put(Bookmarks.DATE_CREATED, now); + } + + if (!values.containsKey(Bookmarks.DATE_MODIFIED)) { + values.put(Bookmarks.DATE_MODIFIED, now); + } - // Generate GUID for new bookmark. Don't override specified GUIDs. if (!values.containsKey(Bookmarks.GUID)) { values.put(Bookmarks.GUID, Utils.generateGuid()); }