Revert "Do not forceLayout when window is resized"

This reverts commit I1e9ef807094b1e0afb32d13fd68b67c3957b15c3,
since it causes a layout jank in Voice IME.

Bug: 18573811
Bug: 22390291
Change-Id: Iaeb1e463d6f316df7bf214ac9439d4230dcac114
This commit is contained in:
Yohei Yukawa
2015-07-28 17:00:33 -07:00
parent 3506621975
commit d2e5647681

View File

@@ -3160,6 +3160,17 @@ public final class ViewRootImpl implements ViewParent,
return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent);
}
private static void forceLayout(View view) {
view.forceLayout();
if (view instanceof ViewGroup) {
ViewGroup group = (ViewGroup) view;
final int count = group.getChildCount();
for (int i = 0; i < count; i++) {
forceLayout(group.getChildAt(i));
}
}
}
private final static int MSG_INVALIDATE = 1;
private final static int MSG_INVALIDATE_RECT = 2;
private final static int MSG_DIE = 3;
@@ -3298,6 +3309,10 @@ public final class ViewRootImpl implements ViewParent,
mReportNextDraw = true;
}
if (mView != null) {
forceLayout(mView);
}
requestLayout();
}
break;
@@ -3312,6 +3327,9 @@ public final class ViewRootImpl implements ViewParent,
mWinFrame.top = t;
mWinFrame.bottom = t + h;
if (mView != null) {
forceLayout(mView);
}
requestLayout();
}
break;