diff options
| author | Tiger Huang <tigerhuang@google.com> | 2020-10-16 04:03:58 +0800 |
|---|---|---|
| committer | Tiger Huang <tigerhuang@google.com> | 2020-10-21 20:20:21 +0800 |
| commit | 2bf8c796c559c35cf8b3af4da8f54b31cc5d620a (patch) | |
| tree | e46a1a5063072448e4af0a92711d18cc0f0dd5ae /core/java/android/view/WindowInsets.java | |
| parent | 83348e3862831cf9ca02fe707480081c65c384b1 (diff) | |
Don't dispatch legacy insets to client
The server won't dispatch the legacy content insets, stable insets, and
visible insets to the client. The insets would be computed from the
insets state by the client.
This CL also fixes the insets scaling issue in compatible mode.
Bug: 149813814
Fix: 169940916
Fix: 165412978
Test: atest WindowAddRemovePerfTest InsetsAnimationControlImplTest
ActivityRecordTests DisplayPolicyLayoutTests
InsetsPolicyTest InsetsStateControllerTest
Change-Id: I83570973f587a6abf887752494f750b46e3e484d
Diffstat (limited to 'core/java/android/view/WindowInsets.java')
| -rw-r--r-- | core/java/android/view/WindowInsets.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java index 94c518483429..8b0cf3bb86dc 100644 --- a/core/java/android/view/WindowInsets.java +++ b/core/java/android/view/WindowInsets.java @@ -924,6 +924,15 @@ public final class WindowInsets { Preconditions.checkArgumentNonnegative(right); Preconditions.checkArgumentNonnegative(bottom); + return insetUnchecked(left, top, right, bottom); + } + + /** + * @see #inset(int, int, int, int) + * @hide + */ + @NonNull + public WindowInsets insetUnchecked(int left, int top, int right, int bottom) { return new WindowInsets( mSystemWindowInsetsConsumed ? null |
