summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/HistoryItem.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2010-11-16 15:40:34 -0800
committerJohn Reck <jreck@google.com>2010-12-10 13:04:25 -0800
commit4b59db8bc6b609307dfcb346283378c5ea993d7c (patch)
treef90dd5cf3fa5bca80f69b042be77fd0d2fd539c4 /src/com/android/browser/HistoryItem.java
parent40411f008112113e769722d8d3ef8da0ef571df6 (diff)
downloadandroid_packages_apps_Gello-4b59db8bc6b609307dfcb346283378c5ea993d7c.tar.gz
android_packages_apps_Gello-4b59db8bc6b609307dfcb346283378c5ea993d7c.tar.bz2
android_packages_apps_Gello-4b59db8bc6b609307dfcb346283378c5ea993d7c.zip
Implements the bookmark star in the History tab
Bug: 3198742 This change wires up the bookmark star in the history tab. The user can now add and remove a history item from their bookmarks. Change-Id: I98f40bb5b4d3e82a9d305e83c750d87efb11a03e
Diffstat (limited to 'src/com/android/browser/HistoryItem.java')
-rw-r--r--src/com/android/browser/HistoryItem.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/browser/HistoryItem.java b/src/com/android/browser/HistoryItem.java
index 11198f04..ccedc016 100644
--- a/src/com/android/browser/HistoryItem.java
+++ b/src/com/android/browser/HistoryItem.java
@@ -18,6 +18,7 @@
package com.android.browser;
import android.content.Context;
+import android.provider.Browser;
import android.view.View;
import android.widget.CompoundButton;
@@ -41,10 +42,10 @@ import android.widget.CompoundButton;
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
if (isChecked) {
- // FIXME: For now, add at the root level. Should we
- // open AddBookmark from here?
- Bookmarks.addBookmark(getContext(), true, mUrl, getName(), null, true, 0);
- LogTag.logBookmarkAdded(mUrl, "history");
+ // Uncheck ourseves. When the bookmark is actually added,
+ // we will be notified
+ setIsBookmark(false);
+ Browser.saveBookmark(getContext(), getName(), mUrl);
} else {
Bookmarks.removeFromBookmarks(getContext(),
getContext().getContentResolver(), mUrl, getName());