diff options
| author | Adrian Roos <roosa@google.com> | 2019-03-25 19:21:26 +0100 |
|---|---|---|
| committer | Adrian Roos <roosa@google.com> | 2019-04-01 15:46:13 +0200 |
| commit | 11dfd279a33e126d2df847656bf73fd92df79218 (patch) | |
| tree | 5b810e7023ec21adf0384c027273c45b83f560c9 /core/java/android/view/ViewRootImpl.java | |
| parent | d96f4fa19c4531f6de96278e80ad6557e00e57c6 (diff) | |
WindowInsets: populate system gesture and tappable element insets
Also fixes an infinite recursion when invoking
TestableContext.(un)registerComponentCallbacks().
Test: atest WindowInsetsPolicyTest
Bug: 126511573
Change-Id: I5c9f40054493a83746bce6124d72412e8eb8a0d1
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 49166ade34ce..ce1b5f829dba 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1916,16 +1916,10 @@ public final class ViewRootImpl implements ViewParent, } contentInsets = ensureInsetsNonNegative(contentInsets, "content"); stableInsets = ensureInsetsNonNegative(stableInsets, "stable"); - if (sNewInsetsMode != NEW_INSETS_MODE_NONE) { - mLastWindowInsets = mInsetsController.calculateInsets( - mContext.getResources().getConfiguration().isScreenRound(), - mAttachInfo.mAlwaysConsumeSystemBars, displayCutout, - contentInsets, stableInsets, mWindowAttributes.softInputMode); - } else { - mLastWindowInsets = new WindowInsets(contentInsets, stableInsets, - mContext.getResources().getConfiguration().isScreenRound(), - mAttachInfo.mAlwaysConsumeSystemBars, displayCutout); - } + mLastWindowInsets = mInsetsController.calculateInsets( + mContext.getResources().getConfiguration().isScreenRound(), + mAttachInfo.mAlwaysConsumeSystemBars, displayCutout, + contentInsets, stableInsets, mWindowAttributes.softInputMode); } return mLastWindowInsets; } |
