From 98b69dc64f404436a244b97b7566257d67b12acc Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 15 Feb 2012 18:29:29 -0800 Subject: [PATCH] Part of fixing issue #6006757: Keyboard dismissal lags Have launcher delay a little before rebuilding its layers, to give the input system time to do the communication it needs with it before blocked on that work. Change-Id: Ib6f533a51c611b8c971c9ca2a1da8d53c8952b44 --- src/com/android/launcher2/Launcher.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index a9d794da82..8e074b53fd 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -578,7 +578,12 @@ public final class Launcher extends Activity if (mFirstTime) { mFirstTime = false; } else { - workspace.post(mBuildLayersRunnable); + // We delay the layer building a bit in order to give + // other message processing a time to run. In particular + // this avoids a delay in hiding the IME if it was + // currently shown, because doing that may involve + // some communication back with the app. + workspace.postDelayed(mBuildLayersRunnable, 500); observer.removeOnPreDrawListener(this); } return true;