Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 558a4186 authored by Jorge Gil's avatar Jorge Gil Committed by Android (Google) Code Review
Browse files

Merge "Always report bounding rects even if caption bg appearance is opaque" into main

parents be28b02d aac7a0b5
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -318,11 +318,12 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
        relayoutParams.mCaptionHeightId = getCaptionHeightIdStatic(taskInfo.getWindowingMode());
        relayoutParams.mCaptionWidthId = getCaptionWidthId(relayoutParams.mLayoutResId);

        if (captionLayoutId == R.layout.desktop_mode_app_controls_window_decor
                && TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) {
            // App is requesting to customize the caption bar. Allow input to fall through to the
            // windows below so that the app can respond to input events on their custom content.
            relayoutParams.mAllowCaptionInputFallthrough = true;
        if (captionLayoutId == R.layout.desktop_mode_app_controls_window_decor) {
            // If the app is requesting to customize the caption bar, allow input to fall through
            // to the windows below so that the app can respond to input events on their custom
            // content.
            relayoutParams.mAllowCaptionInputFallthrough =
                    TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo);
            // Report occluding elements as bounding rects to the insets system so that apps can
            // draw in the empty space in the center:
            //   First, the "app chip" section of the caption bar (+ some extra margins).
+2 −2
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
    }

    @Test
    public void updateRelayoutParams_freeformAndTransparent_allowsInputFallthrough() {
    public void updateRelayoutParams_freeformAndTransparentAppearance_allowsInputFallthrough() {
        final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true);
        taskInfo.configuration.windowConfiguration.setWindowingMode(WINDOWING_MODE_FREEFORM);
        taskInfo.taskDescription.setSystemBarsAppearance(
@@ -191,7 +191,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
    }

    @Test
    public void updateRelayoutParams_freeformButOpaque_disallowsInputFallthrough() {
    public void updateRelayoutParams_freeformButOpaqueAppearance_disallowsInputFallthrough() {
        final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true);
        taskInfo.configuration.windowConfiguration.setWindowingMode(WINDOWING_MODE_FREEFORM);
        taskInfo.taskDescription.setSystemBarsAppearance(0);