diff options
author | Tiger Huang <tigerhuang@google.com> | 2020-12-26 02:44:10 +0800 |
---|---|---|
committer | Tiger Huang <tigerhuang@google.com> | 2020-12-26 02:44:10 +0800 |
commit | 395ccc3e28e700b9397faeaf66aab7912b02604d (patch) | |
tree | 94e5d8deacf6454a36ba0e89818e0b3f107ecb96 | |
parent | a0688d0be2a5d6fb309a93cdd6dbbf9bbcbb222d (diff) | |
download | layoutlib-395ccc3e28e700b9397faeaf66aab7912b02604d.tar.gz |
Remove display cutout from parameters
InsetsState will carry the display cutout instance, so it doesn't need
to be passed via the parameter.
Fix: 175858810
Bug: 161810301
Test: Presubmit
Change-Id: I0ba77a1a7731db0f944461c1213162dcabe78b01
-rw-r--r-- | bridge/src/android/view/WindowManagerImpl.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bridge/src/android/view/WindowManagerImpl.java b/bridge/src/android/view/WindowManagerImpl.java index 8e685a6b38..36b7165c1e 100644 --- a/bridge/src/android/view/WindowManagerImpl.java +++ b/bridge/src/android/view/WindowManagerImpl.java @@ -156,20 +156,17 @@ public class WindowManagerImpl implements WindowManager { private WindowInsets computeWindowInsets() { try { - final DisplayCutout.ParcelableWrapper displayCutout = - new DisplayCutout.ParcelableWrapper(); final InsetsState insetsState = new InsetsState(); final boolean alwaysConsumeSystemBars = WindowManagerGlobal.getWindowManagerService().getWindowInsets( - new WindowManager.LayoutParams(), mContext.getDisplayId(), - displayCutout, insetsState); + new WindowManager.LayoutParams(), mContext.getDisplayId(), insetsState); final Configuration config = mContext.getResources().getConfiguration(); final boolean isScreenRound = config.isScreenRound(); final int windowingMode = config.windowConfiguration.getWindowingMode(); return insetsState.calculateInsets(getCurrentBounds(mContext), null /* ignoringVisibilityState*/, isScreenRound, alwaysConsumeSystemBars, - displayCutout.get(), SOFT_INPUT_ADJUST_NOTHING, 0, SYSTEM_UI_FLAG_VISIBLE, - TYPE_APPLICATION, windowingMode, null /* typeSideMap */); + SOFT_INPUT_ADJUST_NOTHING, 0, SYSTEM_UI_FLAG_VISIBLE, TYPE_APPLICATION, + windowingMode, null /* typeSideMap */); } catch (RemoteException ignore) { } return null; |