diff options
author | Ben Murdoch <benm@google.com> | 2009-10-26 18:03:44 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-10-26 18:03:44 +0000 |
commit | 9e19e44f0b27f12cd07913548c23a885d822e716 (patch) | |
tree | f89fa3e863f578f0ad4661ac297d1500fe1a8426 /src/com | |
parent | 512920d4c7c02c90dcbc27c0f7f33d53fb636dcf (diff) | |
download | packages_apps_Browser-9e19e44f0b27f12cd07913548c23a885d822e716.zip packages_apps_Browser-9e19e44f0b27f12cd07913548c23a885d822e716.tar.gz packages_apps_Browser-9e19e44f0b27f12cd07913548c23a885d822e716.tar.bz2 |
Remove the "clear all" menu option when you are in the website settings activity and are looking at the settings for a specific site rather than the overview of all sites.
Change-Id: Ic31677187ef0befe144168400732c760ebe73f8b
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/browser/WebsiteSettingsActivity.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/browser/WebsiteSettingsActivity.java b/src/com/android/browser/WebsiteSettingsActivity.java index 645e084..7166b16 100644 --- a/src/com/android/browser/WebsiteSettingsActivity.java +++ b/src/com/android/browser/WebsiteSettingsActivity.java @@ -512,6 +512,10 @@ public class WebsiteSettingsActivity extends ListActivity { notifyDataSetChanged(); } } + + public Site currentSite() { + return mCurrentSite; + } } /** @@ -548,8 +552,9 @@ public class WebsiteSettingsActivity extends ListActivity { @Override public boolean onPrepareOptionsMenu(Menu menu) { - // If we aren't listing any sites hide the clear all button (and hence the menu). - return mAdapter.getCount() > 0; + // If we are not on the sites list (rather on the page for a specific site) or + // we aren't listing any sites hide the clear all button (and hence the menu). + return mAdapter.currentSite() == null && mAdapter.getCount() > 0; } @Override |