Merge "Prevent NPE in MessageCompose."

This commit is contained in:
Ben Komalo 2011-05-27 10:33:29 -07:00 committed by Android (Google) Code Review
commit 6d44569356

View File

@ -1603,7 +1603,10 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
if (shouldUseActionTabs()) {
// Tab-based mode switching.
ActionBar actionBar = getActionBar();
actionBar.removeAllTabs();
if (actionBar.getTabCount() > 0) {
actionBar.removeAllTabs();
}
createAndAddTab(R.string.reply_action, ACTION_REPLY);
createAndAddTab(R.string.reply_all_action, ACTION_REPLY_ALL);
createAndAddTab(R.string.forward_action, ACTION_FORWARD);