Loading core/java/android/app/TaskInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -403,6 +403,8 @@ public class TaskInfo { * Please use this with caution. This is just a short-term solution which should be migrated * to a more generic model vs. implying the Task is an App Bubble here. * @hide * * TODO(b/407669465): remove it once migrated to the new approach */ public boolean isAppBubble; Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +9 −0 Original line number Diff line number Diff line Loading @@ -1431,6 +1431,15 @@ public class BubbleController implements ConfigurationChangeListener, return bubble != null && bubble.getPreparingTransition() == null; } /** Returns whether the given task should be an App Bubble */ public boolean shouldBeAppBubble(@NonNull ActivityManager.RunningTaskInfo taskInfo) { if (com.android.window.flags.Flags.rootTaskForBubble()) { return mAppBubbleRootTaskInfo != null && taskInfo.parentTaskId == mAppBubbleRootTaskInfo.taskId; } return taskInfo.isAppBubble; } public boolean isStackExpanded() { return mBubbleData.isExpanded(); } Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java +7 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,13 @@ public class BubbleTransitions { mBubbleController = controller; } /** * Returns whether the given Task should be an App Bubble. */ public boolean shouldBeAppBubble(@NonNull ActivityManager.RunningTaskInfo taskInfo) { return mBubbleController.shouldBeAppBubble(taskInfo); } /** * Returns whether bubbles are showing as the bubble bar. */ Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblesTransitionObserver.java +2 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,8 @@ public class BubblesTransitionObserver implements Transitions.TransitionObserver } // If the opening task was launched by another bubble, skip collapsing the existing one // since BubbleTransitions will start a new bubble for it if (BubbleAnythingFlagHelper.enableCreateAnyBubble() && taskInfo.isAppBubble) { if (BubbleAnythingFlagHelper.enableCreateAnyBubble() && mBubbleController.shouldBeAppBubble(taskInfo)) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "TransitionObserver.onTransitionReady(): " + "skipping app bubble for taskId=%d", taskInfo.taskId); continue; Loading libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -811,7 +811,7 @@ public class DefaultMixedHandler implements MixedTransitionHandler, public boolean requestHasBubbleEnterFromAppBubble(@NonNull TransitionRequestInfo request) { return BubbleAnythingFlagHelper.enableCreateAnyBubble() && request.getTriggerTask() != null && request.getTriggerTask().isAppBubble && mBubbleTransitions.shouldBeAppBubble(request.getTriggerTask()) && !mBubbleTransitions.hasBubbleWithTaskId(request.getTriggerTask().taskId) // TODO(b/408453889): To be removed once we handle transitions with stack view && mBubbleTransitions.isShowingAsBubbleBar(); Loading Loading
core/java/android/app/TaskInfo.java +2 −0 Original line number Diff line number Diff line Loading @@ -403,6 +403,8 @@ public class TaskInfo { * Please use this with caution. This is just a short-term solution which should be migrated * to a more generic model vs. implying the Task is an App Bubble here. * @hide * * TODO(b/407669465): remove it once migrated to the new approach */ public boolean isAppBubble; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +9 −0 Original line number Diff line number Diff line Loading @@ -1431,6 +1431,15 @@ public class BubbleController implements ConfigurationChangeListener, return bubble != null && bubble.getPreparingTransition() == null; } /** Returns whether the given task should be an App Bubble */ public boolean shouldBeAppBubble(@NonNull ActivityManager.RunningTaskInfo taskInfo) { if (com.android.window.flags.Flags.rootTaskForBubble()) { return mAppBubbleRootTaskInfo != null && taskInfo.parentTaskId == mAppBubbleRootTaskInfo.taskId; } return taskInfo.isAppBubble; } public boolean isStackExpanded() { return mBubbleData.isExpanded(); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTransitions.java +7 −0 Original line number Diff line number Diff line Loading @@ -130,6 +130,13 @@ public class BubbleTransitions { mBubbleController = controller; } /** * Returns whether the given Task should be an App Bubble. */ public boolean shouldBeAppBubble(@NonNull ActivityManager.RunningTaskInfo taskInfo) { return mBubbleController.shouldBeAppBubble(taskInfo); } /** * Returns whether bubbles are showing as the bubble bar. */ Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubblesTransitionObserver.java +2 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,8 @@ public class BubblesTransitionObserver implements Transitions.TransitionObserver } // If the opening task was launched by another bubble, skip collapsing the existing one // since BubbleTransitions will start a new bubble for it if (BubbleAnythingFlagHelper.enableCreateAnyBubble() && taskInfo.isAppBubble) { if (BubbleAnythingFlagHelper.enableCreateAnyBubble() && mBubbleController.shouldBeAppBubble(taskInfo)) { ProtoLog.d(WM_SHELL_BUBBLES_NOISY, "TransitionObserver.onTransitionReady(): " + "skipping app bubble for taskId=%d", taskInfo.taskId); continue; Loading
libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -811,7 +811,7 @@ public class DefaultMixedHandler implements MixedTransitionHandler, public boolean requestHasBubbleEnterFromAppBubble(@NonNull TransitionRequestInfo request) { return BubbleAnythingFlagHelper.enableCreateAnyBubble() && request.getTriggerTask() != null && request.getTriggerTask().isAppBubble && mBubbleTransitions.shouldBeAppBubble(request.getTriggerTask()) && !mBubbleTransitions.hasBubbleWithTaskId(request.getTriggerTask().taskId) // TODO(b/408453889): To be removed once we handle transitions with stack view && mBubbleTransitions.isShowingAsBubbleBar(); Loading