diff options
author | Jon Miranda <jonmiranda@google.com> | 2016-09-19 09:31:56 -0700 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2016-09-19 09:31:56 -0700 |
commit | bb918b3532f0f88177a9f38f55440121305c79ce (patch) | |
tree | 80d785551e015c6c10a63fb7c3c2a1351071d282 | |
parent | 80e6aa4b014a669a8e371181174166d6d118a8fc (diff) | |
download | android_packages_apps_Trebuchet-bb918b3532f0f88177a9f38f55440121305c79ce.tar.gz android_packages_apps_Trebuchet-bb918b3532f0f88177a9f38f55440121305c79ce.tar.bz2 android_packages_apps_Trebuchet-bb918b3532f0f88177a9f38f55440121305c79ce.zip |
Only reset search field when back key is hit if there is no query.
Bug: 31432372
Change-Id: I93c7ee661597f934402f464c4f0182a8fad38d39
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsSearchBarController.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsSearchBarController.java b/src/com/android/launcher3/allapps/AllAppsSearchBarController.java index 41abb4c1d..365ab3185 100644 --- a/src/com/android/launcher3/allapps/AllAppsSearchBarController.java +++ b/src/com/android/launcher3/allapps/AllAppsSearchBarController.java @@ -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; } |