From 9c7776d289ea9c54b5c789eef0c06fd28a1240d9 Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 17 Dec 2014 19:17:13 +0100 Subject: [PATCH] Remove leading/trailing spaces from search string Some keyboards insert a trailing space when doing word completion. --- src/com/fsck/k9/activity/MessageList.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 68f2c12ef..2d75c1633 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -398,7 +398,7 @@ public class MessageList extends K9Activity implements MessageListFragmentListen // check if this intent comes from the system search ( remote ) if (Intent.ACTION_SEARCH.equals(intent.getAction())) { //Query was received from Search Dialog - String query = intent.getStringExtra(SearchManager.QUERY); + String query = intent.getStringExtra(SearchManager.QUERY).trim(); mSearch = new LocalSearch(getString(R.string.search_results)); mSearch.setManualSearch(true);