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

Commit 3ce37e89 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix the incorrect calculation of the smallest screen width dp for app...

Merge "Fix the incorrect calculation of the smallest screen width dp for app bubble task behind flags." into main
parents 63608e19 87ae315d
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -2521,7 +2521,18 @@ class TaskFragment extends WindowContainer<WindowContainer> {
                // We should just inherit the value from parent for this temporary state.
                final boolean inPipTransition = windowingMode == WINDOWING_MODE_PINNED
                        && !mTmpFullBounds.isEmpty() && mTmpFullBounds.equals(parentBounds);
                if (WindowConfiguration.isFloating(windowingMode) && !inPipTransition) {
                // For floating tasks and app bubbles, calculate the smallest width from the bounds
                // of the task, because they should not be affected by insets.
                boolean shouldUseTaskBounds = WindowConfiguration.isFloating(windowingMode);
                if (com.android.wm.shell.Flags.enableCreateAnyBubble()
                        && com.android.wm.shell.Flags.enableBubbleAppCompatFixes()) {
                    final Task task = getTask();
                    if (task != null) {
                        // TODO(b/407669465): Update isAppBubble usage once migrated.
                        shouldUseTaskBounds |= task.getTaskInfo().isAppBubble;
                    }
                }
                if (shouldUseTaskBounds && !inPipTransition) {
                    // For floating tasks, calculate the smallest width from the bounds of the
                    // task, because they should not be affected by insets.
                    inOutConfig.smallestScreenWidthDp = (int) (0.5f