Don't ignore fast keystrokes when launching search.

When typing fast on an external keyboard, the sequence goes thus:
1. keypress received, global search intent launched with the key included
   as the initial query
2. activity is paused
3. another keypress received, another global search intent in launched
   with this new key
4. Search activity appears, new keystrokes then end up here

Clearing the typed text immediately results in the first keystroke(s)
being ignored. Do that in onResume() instead so we don't lose them.

Bug: 5276707
Change-Id: I047293f62714ab1438894be7cf84ed127156b2ea
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 6d95555..8aa57bb 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -559,6 +559,7 @@
         if (!mWorkspaceLoading) {
             mWorkspace.post(mBuildLayersRunnable);
         }
+        clearTypedText();
     }
 
     @Override
@@ -1302,7 +1303,6 @@
         if (initialQuery == null) {
             // Use any text typed in the launcher as the initial query
             initialQuery = getTypedText();
-            clearTypedText();
         }
         if (appSearchData == null) {
             appSearchData = new Bundle();