summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson <winsonc@google.com>2016-08-04 17:17:59 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-08-04 17:17:59 +0000
commitc6cd2519ce891aba213513b98287296264d01b48 (patch)
treec4912330fa308e03410ba357e4845fbcee3b7cdd
parent4ec5f98d7ccb372f070b216c2d0979f857660d29 (diff)
parent45a11dd9ee5c9cdaa65527ae0ef1c8b004417f28 (diff)
downloadandroid_packages_apps_Trebuchet-c6cd2519ce891aba213513b98287296264d01b48.tar.gz
android_packages_apps_Trebuchet-c6cd2519ce891aba213513b98287296264d01b48.tar.bz2
android_packages_apps_Trebuchet-c6cd2519ce891aba213513b98287296264d01b48.zip
Prevent refreshing app search results with empty query.
am: 45a11dd9ee Change-Id: I43eb2e8b1b70dfa6ba389c5c082e729fdd53199a
-rw-r--r--src/com/android/launcher3/allapps/AllAppsSearchBarController.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsSearchBarController.java b/src/com/android/launcher3/allapps/AllAppsSearchBarController.java
index b965d744f..9a48367cd 100644
--- a/src/com/android/launcher3/allapps/AllAppsSearchBarController.java
+++ b/src/com/android/launcher3/allapps/AllAppsSearchBarController.java
@@ -20,6 +20,7 @@ import android.content.Intent;
import android.graphics.Rect;
import android.net.Uri;
import android.text.Editable;
+import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
@@ -102,7 +103,7 @@ public abstract class AllAppsSearchBarController
}
protected void refreshSearchResult() {
- if (mQuery == null) {
+ if (TextUtils.isEmpty(mQuery)) {
return;
}
// If play store continues auto updating an app, we want to show partial result.
@@ -143,7 +144,6 @@ public abstract class AllAppsSearchBarController
unfocusSearchField();
mCb.clearSearchResult();
mInput.setText("");
- // We need to reset this after we clear the input text
mQuery = null;
hideKeyboard();
}