diff --git a/src/com/android/email/activity/UIControllerBase.java b/src/com/android/email/activity/UIControllerBase.java index fc937d958..0ec907c7f 100644 --- a/src/com/android/email/activity/UIControllerBase.java +++ b/src/com/android/email/activity/UIControllerBase.java @@ -623,6 +623,20 @@ abstract class UIControllerBase implements MailboxListFragment.Callback, * is actually submitted. */ public void onSearchRequested() { + long accountId = getActualAccountId(); + boolean accountSearchable = false; + if (accountId > 0) { + Account account = Account.restoreAccountWithId(mActivity, accountId); + if (account != null) { + String protocol = account.getProtocol(mActivity); + accountSearchable = (account.mFlags & Account.FLAGS_SUPPORTS_SEARCH) != 0; + } + } + + if (!accountSearchable) { + return; + } + if (isMessageListReady()) { mActionBarController.enterSearchMode(null); }