Merge \"Do a forceLayout if pending insets is changed after relayout window\" into nyc-dev

am: 2756d0707f

Change-Id: Ia95dd424c118b962a9a10ac074d508758b49ea90
This commit is contained in:
Chong Zhang
2016-06-17 18:26:45 +00:00
committed by android-build-merger

View File

@@ -1814,6 +1814,19 @@ public final class ViewRootImpl implements ViewParent,
+ mAttachInfo.mVisibleInsets);
}
// If any of the insets changed, do a forceLayout on the view so that the
// measure cache is cleared. We might have a pending MSG_RESIZED_REPORT
// that is supposed to take care of it, but since pending insets are
// already modified here, it won't detect the frame change after this.
final boolean framesChanged = overscanInsetsChanged
|| contentInsetsChanged
|| stableInsetsChanged
|| visibleInsetsChanged
|| outsetsChanged;
if (mAdded && mView != null && framesChanged) {
forceLayout(mView);
}
if (!hadSurface) {
if (mSurface.isValid()) {
// If we are creating a new surface, then we need to