From 5479f061abed6998a358d5e421194b24d350f195 Mon Sep 17 00:00:00 2001 From: Ben Komalo Date: Thu, 21 Jul 2011 12:09:28 -0700 Subject: [PATCH] Remove cc/bcc option from menu when used. Bug: 5055403 Change-Id: I3a349ddf7b5b186bb6daccd7151b8b352cab0050 --- src/com/android/email/activity/MessageCompose.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/email/activity/MessageCompose.java b/src/com/android/email/activity/MessageCompose.java index 131d559b6..269405e00 100644 --- a/src/com/android/email/activity/MessageCompose.java +++ b/src/com/android/email/activity/MessageCompose.java @@ -1452,6 +1452,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus private void showCcBccFields() { mCcBccContainer.setVisibility(View.VISIBLE); UiUtilities.setVisibilitySafe(this, R.id.add_cc_bcc, View.INVISIBLE); + invalidateOptionsMenu(); } /** @@ -1856,6 +1857,8 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.findItem(R.id.save).setEnabled(mDraftNeedsSaving); + menu.findItem(R.id.add_cc_bcc).setVisible( + (mCcBccContainer == null) || (mCcBccContainer.getVisibility() != View.VISIBLE)); return true; }