From 19882289991e10ba6f2f8a08d03a4b7193b6437d Mon Sep 17 00:00:00 2001 From: James Lemieux Date: Tue, 28 Jan 2014 11:10:05 -0800 Subject: [PATCH] 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 --- src/com/android/email/provider/EmailProvider.java | 1 + src/com/android/email/service/ImapService.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index d604f9cbd..8419d1e6a 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -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; diff --git a/src/com/android/email/service/ImapService.java b/src/com/android/email/service/ImapService.java index f3949bd8d..68c202123 100644 --- a/src/com/android/email/service/ImapService.java +++ b/src/com/android/email/service/ImapService.java @@ -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;