summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/PhoneUi.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/PhoneUi.java')
-rw-r--r--src/com/android/browser/PhoneUi.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index 4da0668..9104095 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -214,6 +214,14 @@ public class PhoneUi extends BaseUi {
if (incognito != null) {
incognito.setVisible(showingNavScreen() || mUseQuickControls);
}
+ MenuItem closeOthers = menu.findItem(R.id.close_other_tabs_id);
+ if (closeOthers != null) {
+ boolean isLastTab = true;
+ if (tab != null) {
+ isLastTab = (mTabControl.getTabCount() <= 1);
+ }
+ closeOthers.setEnabled(!isLastTab);
+ }
if (showingNavScreen()) {
menu.setGroupVisible(R.id.LIVE_MENU, false);
menu.setGroupVisible(R.id.SNAPSHOT_MENU, false);