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
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index a9d794d..8e074b5 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -578,7 +578,12 @@
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;