Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +1 −2 Original line number Diff line number Diff line Loading @@ -822,7 +822,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin || (isStatusBarVisible && !isKeyguardVisibleAndOccluded); } relayoutParams.mIsCaptionVisible = showCaption; relayoutParams.mIsInsetSource = isAppHeader && !inFullImmersiveMode; if (isAppHeader) { if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) { // If the app is requesting to customize the caption bar, allow input to fall Loading @@ -847,7 +847,6 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin WindowInsets.Type.systemBars() & ~WindowInsets.Type.captionBar(), false /* ignoreVisibility */); relayoutParams.mCaptionTopPadding = systemBarInsets.top; relayoutParams.mIsInsetSource = false; } // Report occluding elements as bounding rects to the insets system so that apps can // draw in the empty space in the center: Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +18 −11 Original line number Diff line number Diff line Loading @@ -394,11 +394,11 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> final WindowDecorationInsets newInsets = new WindowDecorationInsets( mTaskInfo.token, mOwner, captionInsetsRect, boundingRects, params.mInsetSourceFlags); params.mInsetSourceFlags, params.mIsInsetSource); if (!newInsets.equals(mWindowDecorationInsets)) { // Add or update this caption as an insets source. mWindowDecorationInsets = newInsets; mWindowDecorationInsets.addOrUpdate(wct); mWindowDecorationInsets.update(wct); } } Loading Loading @@ -713,10 +713,11 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> final int captionHeight = loadDimensionPixelSize(mContext.getResources(), captionHeightId); final Rect captionInsets = new Rect(0, 0, 0, captionHeight); final WindowDecorationInsets newInsets = new WindowDecorationInsets(mTaskInfo.token, mOwner, captionInsets, null /* boundingRets */, 0 /* flags */); mOwner, captionInsets, null /* boundingRets */, 0 /* flags */, true /* shouldAddCaptionInset */); if (!newInsets.equals(mWindowDecorationInsets)) { mWindowDecorationInsets = newInsets; mWindowDecorationInsets.addOrUpdate(wct); mWindowDecorationInsets.update(wct); } } Loading Loading @@ -819,22 +820,27 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> private final Rect mFrame; private final Rect[] mBoundingRects; private final @InsetsSource.Flags int mFlags; private final boolean mShouldAddCaptionInset; private WindowDecorationInsets(WindowContainerToken token, Binder owner, Rect frame, Rect[] boundingRects, @InsetsSource.Flags int flags) { Rect[] boundingRects, @InsetsSource.Flags int flags, boolean shouldAddCaptionInset) { mToken = token; mOwner = owner; mFrame = frame; mBoundingRects = boundingRects; mFlags = flags; mShouldAddCaptionInset = shouldAddCaptionInset; } void addOrUpdate(WindowContainerTransaction wct) { void update(WindowContainerTransaction wct) { if (mShouldAddCaptionInset) { wct.addInsetsSource(mToken, mOwner, INDEX, captionBar(), mFrame, mBoundingRects, mFlags); wct.addInsetsSource(mToken, mOwner, INDEX, mandatorySystemGestures(), mFrame, mBoundingRects, 0 /* flags */); } } void remove(WindowContainerTransaction wct) { wct.removeInsetsSource(mToken, mOwner, INDEX, captionBar()); Loading @@ -848,7 +854,8 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> return Objects.equals(mToken, that.mToken) && Objects.equals(mOwner, that.mOwner) && Objects.equals(mFrame, that.mFrame) && Objects.deepEquals(mBoundingRects, that.mBoundingRects) && mFlags == that.mFlags; && mFlags == that.mFlags && mShouldAddCaptionInset == that.mShouldAddCaptionInset; } @Override Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +1 −2 Original line number Diff line number Diff line Loading @@ -822,7 +822,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin || (isStatusBarVisible && !isKeyguardVisibleAndOccluded); } relayoutParams.mIsCaptionVisible = showCaption; relayoutParams.mIsInsetSource = isAppHeader && !inFullImmersiveMode; if (isAppHeader) { if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) { // If the app is requesting to customize the caption bar, allow input to fall Loading @@ -847,7 +847,6 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin WindowInsets.Type.systemBars() & ~WindowInsets.Type.captionBar(), false /* ignoreVisibility */); relayoutParams.mCaptionTopPadding = systemBarInsets.top; relayoutParams.mIsInsetSource = false; } // Report occluding elements as bounding rects to the insets system so that apps can // draw in the empty space in the center: Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java +18 −11 Original line number Diff line number Diff line Loading @@ -394,11 +394,11 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> final WindowDecorationInsets newInsets = new WindowDecorationInsets( mTaskInfo.token, mOwner, captionInsetsRect, boundingRects, params.mInsetSourceFlags); params.mInsetSourceFlags, params.mIsInsetSource); if (!newInsets.equals(mWindowDecorationInsets)) { // Add or update this caption as an insets source. mWindowDecorationInsets = newInsets; mWindowDecorationInsets.addOrUpdate(wct); mWindowDecorationInsets.update(wct); } } Loading Loading @@ -713,10 +713,11 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> final int captionHeight = loadDimensionPixelSize(mContext.getResources(), captionHeightId); final Rect captionInsets = new Rect(0, 0, 0, captionHeight); final WindowDecorationInsets newInsets = new WindowDecorationInsets(mTaskInfo.token, mOwner, captionInsets, null /* boundingRets */, 0 /* flags */); mOwner, captionInsets, null /* boundingRets */, 0 /* flags */, true /* shouldAddCaptionInset */); if (!newInsets.equals(mWindowDecorationInsets)) { mWindowDecorationInsets = newInsets; mWindowDecorationInsets.addOrUpdate(wct); mWindowDecorationInsets.update(wct); } } Loading Loading @@ -819,22 +820,27 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> private final Rect mFrame; private final Rect[] mBoundingRects; private final @InsetsSource.Flags int mFlags; private final boolean mShouldAddCaptionInset; private WindowDecorationInsets(WindowContainerToken token, Binder owner, Rect frame, Rect[] boundingRects, @InsetsSource.Flags int flags) { Rect[] boundingRects, @InsetsSource.Flags int flags, boolean shouldAddCaptionInset) { mToken = token; mOwner = owner; mFrame = frame; mBoundingRects = boundingRects; mFlags = flags; mShouldAddCaptionInset = shouldAddCaptionInset; } void addOrUpdate(WindowContainerTransaction wct) { void update(WindowContainerTransaction wct) { if (mShouldAddCaptionInset) { wct.addInsetsSource(mToken, mOwner, INDEX, captionBar(), mFrame, mBoundingRects, mFlags); wct.addInsetsSource(mToken, mOwner, INDEX, mandatorySystemGestures(), mFrame, mBoundingRects, 0 /* flags */); } } void remove(WindowContainerTransaction wct) { wct.removeInsetsSource(mToken, mOwner, INDEX, captionBar()); Loading @@ -848,7 +854,8 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer> return Objects.equals(mToken, that.mToken) && Objects.equals(mOwner, that.mOwner) && Objects.equals(mFrame, that.mFrame) && Objects.deepEquals(mBoundingRects, that.mBoundingRects) && mFlags == that.mFlags; && mFlags == that.mFlags && mShouldAddCaptionInset == that.mShouldAddCaptionInset; } @Override Loading