Only reset search field when back key is hit if there is no query.
Bug: 31432372 Change-Id: I93c7ee661597f934402f464c4f0182a8fad38d39
This commit is contained in:
parent
80e6aa4b01
commit
bb918b3532
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue