Loading core/java/android/view/InsetsSourceControl.java +11 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,17 @@ public class InsetsSourceControl implements Parcelable { mSurfacePosition = surfacePosition; } public InsetsSourceControl(InsetsSourceControl other) { mType = other.mType; if (other.mLeash != null) { mLeash = new SurfaceControl(); mLeash.copyFrom(other.mLeash); } else { mLeash = null; } mSurfacePosition = new Point(other.mSurfacePosition); } public int getType() { return mType; } Loading core/java/android/view/ViewRootImpl.java +11 −0 Original line number Diff line number Diff line Loading @@ -7619,11 +7619,22 @@ public final class ViewRootImpl implements ViewParent, } private void dispatchInsetsChanged(InsetsState insetsState) { if (Binder.getCallingPid() == android.os.Process.myPid()) { insetsState = new InsetsState(insetsState, true /* copySource */); } mHandler.obtainMessage(MSG_INSETS_CHANGED, insetsState).sendToTarget(); } private void dispatchInsetsControlChanged(InsetsState insetsState, InsetsSourceControl[] activeControls) { if (Binder.getCallingPid() == android.os.Process.myPid()) { insetsState = new InsetsState(insetsState, true /* copySource */); if (activeControls != null) { for (int i = activeControls.length - 1; i >= 0; i--) { activeControls[i] = new InsetsSourceControl(activeControls[i]); } } } SomeArgs args = SomeArgs.obtain(); args.arg1 = insetsState; args.arg2 = activeControls; Loading services/core/java/com/android/server/wm/DisplayPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -1878,7 +1878,7 @@ public class DisplayPolicy { final Rect dfu = displayFrames.mUnrestricted; Insets insets = Insets.of(0, 0, 0, 0); for (int i = types.size() - 1; i >= 0; i--) { insets = Insets.max(insets, mDisplayContent.getInsetsStateController() insets = Insets.max(insets, mDisplayContent.getInsetsPolicy() .getInsetsForDispatch(win).getSource(types.valueAt(i)) .calculateInsets(dfu, attrs.getFitIgnoreVisibility())); } Loading services/core/java/com/android/server/wm/WindowManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -1651,7 +1651,8 @@ public class WindowManagerService extends IWindowManager.Stub outFrame, outContentInsets, outStableInsets, outDisplayCutout)) { res |= WindowManagerGlobal.ADD_FLAG_ALWAYS_CONSUME_SYSTEM_BARS; } outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win)); outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win), win.mClient instanceof IWindow.Stub /* copySource */); if (mInTouchMode) { res |= WindowManagerGlobal.ADD_FLAG_IN_TOUCH_MODE; Loading Loading @@ -2335,7 +2336,8 @@ public class WindowManagerService extends IWindowManager.Stub outStableInsets); outCutout.set(win.getWmDisplayCutout().getDisplayCutout()); outBackdropFrame.set(win.getBackdropFrame(win.getFrameLw())); outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win)); outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win), win.mClient instanceof IWindow.Stub /* copySource */); if (DEBUG) { Slog.v(TAG_WM, "Relayout given client " + client.asBinder() + ", requestedWidth=" + requestedWidth Loading services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -767,7 +767,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mPowerManagerWrapper = powerManagerWrapper; mForceSeamlesslyRotate = token.mRoundedCornerOverlay; mClientInsetsState = getDisplayContent().getInsetsStateController().getInsetsForDispatch(this); getDisplayContent().getInsetsPolicy().getInsetsForDispatch(this); if (DEBUG) { Slog.v(TAG, "Window " + this + " client=" + c.asBinder() + " token=" + token + " (" + mAttrs.token + ")" + " params=" + a); Loading Loading
core/java/android/view/InsetsSourceControl.java +11 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,17 @@ public class InsetsSourceControl implements Parcelable { mSurfacePosition = surfacePosition; } public InsetsSourceControl(InsetsSourceControl other) { mType = other.mType; if (other.mLeash != null) { mLeash = new SurfaceControl(); mLeash.copyFrom(other.mLeash); } else { mLeash = null; } mSurfacePosition = new Point(other.mSurfacePosition); } public int getType() { return mType; } Loading
core/java/android/view/ViewRootImpl.java +11 −0 Original line number Diff line number Diff line Loading @@ -7619,11 +7619,22 @@ public final class ViewRootImpl implements ViewParent, } private void dispatchInsetsChanged(InsetsState insetsState) { if (Binder.getCallingPid() == android.os.Process.myPid()) { insetsState = new InsetsState(insetsState, true /* copySource */); } mHandler.obtainMessage(MSG_INSETS_CHANGED, insetsState).sendToTarget(); } private void dispatchInsetsControlChanged(InsetsState insetsState, InsetsSourceControl[] activeControls) { if (Binder.getCallingPid() == android.os.Process.myPid()) { insetsState = new InsetsState(insetsState, true /* copySource */); if (activeControls != null) { for (int i = activeControls.length - 1; i >= 0; i--) { activeControls[i] = new InsetsSourceControl(activeControls[i]); } } } SomeArgs args = SomeArgs.obtain(); args.arg1 = insetsState; args.arg2 = activeControls; Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -1878,7 +1878,7 @@ public class DisplayPolicy { final Rect dfu = displayFrames.mUnrestricted; Insets insets = Insets.of(0, 0, 0, 0); for (int i = types.size() - 1; i >= 0; i--) { insets = Insets.max(insets, mDisplayContent.getInsetsStateController() insets = Insets.max(insets, mDisplayContent.getInsetsPolicy() .getInsetsForDispatch(win).getSource(types.valueAt(i)) .calculateInsets(dfu, attrs.getFitIgnoreVisibility())); } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -1651,7 +1651,8 @@ public class WindowManagerService extends IWindowManager.Stub outFrame, outContentInsets, outStableInsets, outDisplayCutout)) { res |= WindowManagerGlobal.ADD_FLAG_ALWAYS_CONSUME_SYSTEM_BARS; } outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win)); outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win), win.mClient instanceof IWindow.Stub /* copySource */); if (mInTouchMode) { res |= WindowManagerGlobal.ADD_FLAG_IN_TOUCH_MODE; Loading Loading @@ -2335,7 +2336,8 @@ public class WindowManagerService extends IWindowManager.Stub outStableInsets); outCutout.set(win.getWmDisplayCutout().getDisplayCutout()); outBackdropFrame.set(win.getBackdropFrame(win.getFrameLw())); outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win)); outInsetsState.set(displayContent.getInsetsPolicy().getInsetsForDispatch(win), win.mClient instanceof IWindow.Stub /* copySource */); if (DEBUG) { Slog.v(TAG_WM, "Relayout given client " + client.asBinder() + ", requestedWidth=" + requestedWidth Loading
services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -767,7 +767,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mPowerManagerWrapper = powerManagerWrapper; mForceSeamlesslyRotate = token.mRoundedCornerOverlay; mClientInsetsState = getDisplayContent().getInsetsStateController().getInsetsForDispatch(this); getDisplayContent().getInsetsPolicy().getInsetsForDispatch(this); if (DEBUG) { Slog.v(TAG, "Window " + this + " client=" + c.asBinder() + " token=" + token + " (" + mAttrs.token + ")" + " params=" + a); Loading