summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Parkinson <ianp@google.com>2014-09-01 15:40:53 +0100
committerIan Parkinson <ianp@google.com>2014-09-01 16:08:07 +0100
commit047036e2c171fd676e02319fefdced8a6b55a035 (patch)
treec4af838ebb6422f549d512de16b592c4395e1dea
parent2854d256192a8260ddeb2f2e94bc1a2fc5f6ef71 (diff)
downloadandroid_packages_apps_Trebuchet-047036e2c171fd676e02319fefdced8a6b55a035.tar.gz
android_packages_apps_Trebuchet-047036e2c171fd676e02319fefdced8a6b55a035.tar.bz2
android_packages_apps_Trebuchet-047036e2c171fd676e02319fefdced8a6b55a035.zip
Give GEL a way to clear the typed text when it starts searching
...otherwise it'll be re-used every time the user starts a new query. We take care not to change the way that typed text gets cleared (in onWindowVisibilityChanged()) in other cases. GEL will actually use this text in ag/537329. This CL will cause the GEL build to break until that change is submitted, so I'll be sure to submit them both close to each other. Bug: 16953058 Change-Id: I7ed613e69eb7a38b1a5e6108715ca614b59fd24d
-rw-r--r--src/com/android/launcher3/Launcher.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index efb1ee17d..83f813dc6 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2064,14 +2064,25 @@ public class Launcher extends Activity
sourceBounds = mSearchDropTargetBar.getSearchBarBounds();
}
- startSearch(initialQuery, selectInitialQuery,
+ boolean clearTextImmediately = startSearch(initialQuery, selectInitialQuery,
appSearchData, sourceBounds);
+ if (clearTextImmediately) {
+ clearTypedText();
+ }
}
- public void startSearch(String initialQuery,
+ /**
+ * Start a text search.
+ *
+ * @return {@code true} if the search will start immediately, so any further keypresses
+ * will be handled directly by the search UI. {@code false} if {@link Launcher} should continue
+ * to buffer keypresses.
+ */
+ public boolean startSearch(String initialQuery,
boolean selectInitialQuery, Bundle appSearchData, Rect sourceBounds) {
startGlobalSearch(initialQuery, selectInitialQuery,
appSearchData, sourceBounds);
+ return false;
}
/**