boolean isChecked) {
if (isChecked) {
Bookmarks.addBookmark(mContext,
- mContext.getContentResolver(), mUrl, getName());
+ mContext.getContentResolver(), mUrl, getName(), true);
} else {
Bookmarks.removeFromBookmarks(mContext,
mContext.getContentResolver(), mUrl);
};
}
- void copyTo(HistoryItem item) {
+ /* package */ void copyTo(HistoryItem item) {
item.mTextView.setText(mTextView.getText());
item.mUrlText.setText(mUrlText.getText());
item.setIsBookmark(mStar.isChecked());
}
/**
+ * Whether or not this item represents a bookmarked site
+ */
+ /* package */ boolean isBookmark() {
+ return mStar.isChecked();
+ }
+
+ /**
* Set whether or not this represents a bookmark, and make sure the star
* behaves appropriately.
*/
- void setIsBookmark(boolean isBookmark) {
+ /* package */ void setIsBookmark(boolean isBookmark) {
mStar.setOnCheckedChangeListener(null);
mStar.setChecked(isBookmark);
mStar.setOnCheckedChangeListener(mListener);