Let each window has its own requested insets state

Otherwise, all windows would reference to the same InsetsState object
which is referenced by InsetsStateController.mState.

Bug: 111084606
Test: Open any app in the new insets mode, and see if the status bar
      color view is shown as expected.

Change-Id: I04ca3aaa7c40c77c9022f52aee0579593fd4696b
This commit is contained in:
Tiger Huang
2020-01-08 17:34:24 +08:00
parent 4d5396057c
commit 4045971dc7

View File

@@ -792,8 +792,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mSeq = seq;
mPowerManagerWrapper = powerManagerWrapper;
mForceSeamlesslyRotate = token.mRoundedCornerOverlay;
mRequestedInsetsState =
getDisplayContent().getInsetsPolicy().getInsetsForDispatch(this);
mRequestedInsetsState = new InsetsState(
getDisplayContent().getInsetsPolicy().getInsetsForDispatch(this),
true /* copySources */);
if (DEBUG) {
Slog.v(TAG, "Window " + this + " client=" + c.asBinder()
+ " token=" + token + " (" + mAttrs.token + ")" + " params=" + a);