From 8193f690c2b7115ec8441f7374d4e10ec8d9be09 Mon Sep 17 00:00:00 2001 From: Mathew Inwood Date: Wed, 12 Oct 2011 17:30:58 +0100 Subject: [PATCH] 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 --- src/com/android/launcher2/Launcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 6d95555a13..8aa57bb097 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -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();