Hardware Search button doesn't work

b/11689324

In Jelly Bean, the hardware button has been redirected to always open Google Now by default. But
Email does run on Ice Cream Sandwich and on that platform the hardware search button should invoke
a local search of Email. The issue at play here was that IMAP accounts weren't reporting themselves
as being capable of a remote server search, even though they are in practice. Adjusting this
capability fixes the issue.

Change-Id: I829d08d3bb9c8d09beacc85fe8b5903a8565d178
This commit is contained in:
James Lemieux 2014-01-28 11:10:05 -08:00
parent dcf7274a1c
commit 1988228999
2 changed files with 2 additions and 0 deletions

View File

@ -3047,6 +3047,7 @@ public class EmailProvider extends ContentProvider {
if (TextUtils.equals(context.getString(R.string.protocol_imap), protocol) ||
TextUtils.equals(context.getString(R.string.protocol_legacy_imap), protocol)) {
capabilities = AccountCapabilities.SYNCABLE_FOLDERS |
AccountCapabilities.SERVER_SEARCH |
AccountCapabilities.FOLDER_SERVER_SEARCH |
AccountCapabilities.UNDO |
AccountCapabilities.DISCARD_CONVERSATION_DRAFTS;

View File

@ -152,6 +152,7 @@ public class ImapService extends Service {
@Override
public int getCapabilities(Account acct) throws RemoteException {
return AccountCapabilities.SYNCABLE_FOLDERS |
AccountCapabilities.SERVER_SEARCH |
AccountCapabilities.FOLDER_SERVER_SEARCH |
AccountCapabilities.UNDO |
AccountCapabilities.DISCARD_CONVERSATION_DRAFTS;