diff options
author | Leon Scroggins <scroggo@google.com> | 2009-07-28 14:14:48 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2009-07-28 14:14:48 -0400 |
commit | 186e593776c396bde3d720addd6f6842fe880a7c (patch) | |
tree | 0db3dffc84e1481bb4ebb6003a56e307d348c0c1 /src/com/android/browser/HistoryItem.java | |
parent | ee0d639003a5dec32cf45416b0c751def2d4d25a (diff) | |
download | android_packages_apps_Gello-186e593776c396bde3d720addd6f6842fe880a7c.tar.gz android_packages_apps_Gello-186e593776c396bde3d720addd6f6842fe880a7c.tar.bz2 android_packages_apps_Gello-186e593776c396bde3d720addd6f6842fe880a7c.zip |
In History context menu, do not show "Add bookmark" for bookmarks.
Fix for http://b/issue?id=1688867. Instead of providing an option
to add a bookmark to bookmarks, provide an option to remove the
item from bookmarks. Also display the item as the context menu
header.
Diffstat (limited to 'src/com/android/browser/HistoryItem.java')
-rw-r--r-- | src/com/android/browser/HistoryItem.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/browser/HistoryItem.java b/src/com/android/browser/HistoryItem.java index 8a994f37..e8f15b1c 100644 --- a/src/com/android/browser/HistoryItem.java +++ b/src/com/android/browser/HistoryItem.java @@ -55,7 +55,7 @@ import android.widget.TextView; }; } - void copyTo(HistoryItem item) { + /* package */ void copyTo(HistoryItem item) { item.mTextView.setText(mTextView.getText()); item.mUrlText.setText(mUrlText.getText()); item.setIsBookmark(mStar.isChecked()); @@ -63,10 +63,17 @@ import android.widget.TextView; } /** + * 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); |