Merge "Only reset search field when back key is hit if there is no query." into ub-launcher3-calgary-polish

This commit is contained in:
Jonathan Miranda
2016-09-19 23:08:42 +00:00
committed by Android (Google) Code Review
@@ -127,10 +127,9 @@ public abstract class AllAppsSearchBarController
@Override
public boolean onBackKey() {
// Only hide the search field if there is no query, or if there
// are no filtered results
// Only hide the search field if there is no query
String query = Utilities.trim(mInput.getEditableText().toString());
if (query.isEmpty() || mApps.hasNoFilteredResults()) {
if (query.isEmpty()) {
reset();
return true;
}