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
This commit is contained in:
Mathew Inwood
2011-10-12 17:30:58 +01:00
parent 3f74f0cbc6
commit 8193f690c2
+1 -1
View File
@@ -559,6 +559,7 @@ public final class Launcher extends Activity
if (!mWorkspaceLoading) {
mWorkspace.post(mBuildLayersRunnable);
}
clearTypedText();
}
@Override
@@ -1302,7 +1303,6 @@ public final class Launcher extends Activity
if (initialQuery == null) {
// Use any text typed in the launcher as the initial query
initialQuery = getTypedText();
clearTypedText();
}
if (appSearchData == null) {
appSearchData = new Bundle();