Only reset search field when back key is hit if there is no query.

Bug: 31432372
Change-Id: I93c7ee661597f934402f464c4f0182a8fad38d39
This commit is contained in:
Jon Miranda 2016-09-19 09:31:56 -07:00
parent 80e6aa4b01
commit bb918b3532
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}