summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/HistoryItem.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@android.com>2009-07-10 17:51:48 -0700
committerChristopher Tate <ctate@android.com>2009-07-27 16:35:27 -0700
commit9c0dd8caacff99ba76bbb9dc2cab156cded505a8 (patch)
treed3a4d257bf67f6529261df9a71e351ece9b89a6e /src/com/android/browser/HistoryItem.java
parent09377c370181683273264d625784c7bc2415dedd (diff)
downloadpackages_apps_Browser-9c0dd8caacff99ba76bbb9dc2cab156cded505a8.zip
packages_apps_Browser-9c0dd8caacff99ba76bbb9dc2cab156cded505a8.tar.gz
packages_apps_Browser-9c0dd8caacff99ba76bbb9dc2cab156cded505a8.tar.bz2
First real cut of bookmarks backup agent
The agent now does backup/restore of the bookmarks table. Whether to back up is determined by flattening the bookmark table, CRCing the flattened representation, and comparing the CRC with the previous backup pass's version. If they differ (or if the file size differs), the table is deemed to have changed and we send the flattened file off to the server as a single key. On restore, the bookmark records are read individually from the flattened representation, the existing bookmarks table is queried for a matching URL, and if none exists the bookmark is inserted into the table. Bookmarks.addBookmark() now takes a boolean argument "retainIcon." When false, the implementation will not call into the web icon database. This is necessary during restore because the web icon database is only available from the Browser app's main thread, but restore happens without the app proper being involved. The other call points for addBookmark() have been updated to pass 'true,' i.e. preserving the current behavior.
Diffstat (limited to 'src/com/android/browser/HistoryItem.java')
-rw-r--r--src/com/android/browser/HistoryItem.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/browser/HistoryItem.java b/src/com/android/browser/HistoryItem.java
index b37a3bd..8a994f3 100644
--- a/src/com/android/browser/HistoryItem.java
+++ b/src/com/android/browser/HistoryItem.java
@@ -46,7 +46,7 @@ import android.widget.TextView;
boolean isChecked) {
if (isChecked) {
Bookmarks.addBookmark(mContext,
- mContext.getContentResolver(), mUrl, getName());
+ mContext.getContentResolver(), mUrl, getName(), true);
} else {
Bookmarks.removeFromBookmarks(mContext,
mContext.getContentResolver(), mUrl);