Prevent search on POP

We were hiding the search icon from the actionbar but didn't take into
account the use of a hardware button.

Bug: 5051691
Change-Id: I2e0bfd1d0bb4faa3238e567c02189894db5f6c44
This commit is contained in:
Ben Komalo 2011-07-20 10:37:48 -07:00
parent e12c0522f8
commit 5aa3d71209

View File

@ -623,6 +623,20 @@ abstract class UIControllerBase implements MailboxListFragment.Callback,
* is actually submitted. * is actually submitted.
*/ */
public void onSearchRequested() { 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()) { if (isMessageListReady()) {
mActionBarController.enterSearchMode(null); mActionBarController.enterSearchMode(null);
} }