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

Commit ef97f713 authored by Annie Lin's avatar Annie Lin
Browse files

Replace usage of TaskInfo#isAppBubble in bubble app compat fixes.

Use Task#mLaunchNextToBubble instead. Calling TaskInfo#isAppBubble would need to run fillTaskInfo for every config change, which may be unnecessarily expensive.

Bug: 384610303
Bug: 384610304
Test: wm presubmit
Flag: com.android.wm.shell.enable_create_any_bubble
Flag: com.android.wm.shell.enable_bubble_app_compat_fixes
Change-Id: Ifd361644973e662523a88b023d27768e73fd17cb
parent ddd1aae6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7569,8 +7569,8 @@ final class ActivityRecord extends WindowToken {
            final Task task = getTask();
            if (task != null) {
                // Similar to floating windows, an app bubble should not apply legacy insets.
                // TODO(b/407669465): Update isAppBubble usage once migrated to the new approach.
                shouldApplyLegacyInsets &= !task.getTaskInfo().isAppBubble;
                // TODO(b/407669465): Update mLaunchNextToBubble usage when migrated.
                shouldApplyLegacyInsets &= !task.mLaunchNextToBubble;
            }
        }
        mResolveConfigHint.resolveTmpOverrides(mDisplayContent, newParentConfiguration,
+2 −2
Original line number Diff line number Diff line
@@ -2528,8 +2528,8 @@ class TaskFragment extends WindowContainer<WindowContainer> {
                        && 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;
                        // TODO(b/407669465): Update mLaunchNextToBubble usage when migrated.
                        shouldUseTaskBounds |= task.mLaunchNextToBubble;
                    }
                }
                if (shouldUseTaskBounds && !inPipTransition) {