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
This commit is contained in:
Dianne Hackborn 2012-02-15 18:29:29 -08:00
parent fb314c7782
commit 98b69dc64f
1 changed files with 6 additions and 1 deletions

View File

@ -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;