diff options
| author | Adam Powell <adamp@google.com> | 2014-04-16 23:14:57 +0000 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2014-04-16 23:14:57 +0000 |
| commit | 2accbf904f0dfa42f1a776d2e1ea7b01898929c0 (patch) | |
| tree | f0a0bbd06a906ece96daaab5a3010267aeeb61a8 /core/java/android/view/ViewRootImpl.java | |
| parent | 01ebfbd0a0a3a89b563ab6c8c346c669eca39a1a (diff) | |
| download | frameworks_base-2accbf904f0dfa42f1a776d2e1ea7b01898929c0.zip frameworks_base-2accbf904f0dfa42f1a776d2e1ea7b01898929c0.tar.gz frameworks_base-2accbf904f0dfa42f1a776d2e1ea7b01898929c0.tar.bz2 | |
Revert the revert of adding isRound to WindowInsets after early merge
This reverts commit 01ebfbd0a0a3a89b563ab6c8c346c669eca39a1a.
Change-Id: I3d5a3523a1505cc3bfd0172c7282a8eda21ae206
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index ef22def..eec4354 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1171,6 +1171,11 @@ public final class ViewRootImpl implements ViewParent, m.preTranslate(-attachInfo.mWindowLeft, -attachInfo.mWindowTop); } + void dispatchApplyInsets(View host) { + mFitSystemWindowsInsets.set(mAttachInfo.mContentInsets); + host.dispatchApplyWindowInsets(new WindowInsets(mFitSystemWindowsInsets)); + } + private void performTraversals() { // cache mView since it is used so much below... final View host = mView; @@ -1257,8 +1262,7 @@ public final class ViewRootImpl implements ViewParent, } host.dispatchAttachedToWindow(attachInfo, 0); attachInfo.mTreeObserver.dispatchOnWindowAttachedChange(true); - mFitSystemWindowsInsets.set(mAttachInfo.mContentInsets); - host.fitSystemWindows(mFitSystemWindowsInsets); + dispatchApplyInsets(host); //Log.i(TAG, "Screen on initialized: " + attachInfo.mKeepScreenOn); } else { @@ -1383,9 +1387,8 @@ public final class ViewRootImpl implements ViewParent, if (mFitSystemWindowsRequested) { mFitSystemWindowsRequested = false; - mFitSystemWindowsInsets.set(mAttachInfo.mContentInsets); mLastOverscanRequested = mAttachInfo.mOverscanRequested; - host.fitSystemWindows(mFitSystemWindowsInsets); + dispatchApplyInsets(host); if (mLayoutRequested) { // Short-circuit catching a new layout request here, so // we don't need to go through two layout passes when things @@ -1559,8 +1562,7 @@ public final class ViewRootImpl implements ViewParent, mLastSystemUiVisibility = mAttachInfo.mSystemUiVisibility; mLastOverscanRequested = mAttachInfo.mOverscanRequested; mFitSystemWindowsRequested = false; - mFitSystemWindowsInsets.set(mAttachInfo.mContentInsets); - host.fitSystemWindows(mFitSystemWindowsInsets); + dispatchApplyInsets(host); } if (visibleInsetsChanged) { mAttachInfo.mVisibleInsets.set(mPendingVisibleInsets); |
