diff options
| author | 2016-06-17 18:26:45 +0000 | |
|---|---|---|
| committer | 2016-06-17 18:26:45 +0000 | |
| commit | dba235d91aa8346af91c8b7b4db69ee7bfb5b3e8 (patch) | |
| tree | 53880482225631b8d2766dc4fb47444e4cbde6e6 | |
| parent | 8b1ddeb89a0d2ea98c8ad582ac300ad4aab4e983 (diff) | |
| parent | 2756d0707f687314b22dc28f7026a6ce56e3d054 (diff) | |
Merge \"Do a forceLayout if pending insets is changed after relayout window\" into nyc-dev
am: 2756d0707f
Change-Id: Ia95dd424c118b962a9a10ac074d508758b49ea90
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 19b1cf3c86ba..48bdcb2e6720 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -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 |