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

Commit 81a5be6e authored by Chris Li's avatar Chris Li
Browse files

Minor cleanup for animateEnterBubblesFromBubble

Remove dead code:
TYPE_LAUNCH_OR_CONVERT_TO_BUBBLE_FROM_EXISTING_BUBBLE is only used if
enableCreateAnyBubble.

Bug: 417848405
Test: cleanup
Flag: EXEMPT cleanup
Change-Id: I553c40d199af3f4674f757b7108018b5ac405c18
parent e488d58e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1761,13 +1761,11 @@ public class BubbleController implements ConfigurationChangeListener,
     *
     * @param taskInfo the task.
     */
    @Nullable
    public Transitions.TransitionHandler expandStackAndSelectBubbleForExistingTransition(
    @NonNull
    Transitions.TransitionHandler expandStackAndSelectBubbleForExistingTransition(
            @NonNull ActivityManager.RunningTaskInfo taskInfo,
            @NonNull IBinder transition,
            Consumer<Transitions.TransitionHandler> onInflatedCallback) {
        if (!BubbleAnythingFlagHelper.enableCreateAnyBubble()) return null;

        Bubble b = mBubbleData.getBubbleInStackWithTaskId(taskInfo.taskId);
        if (b != null) {
            // Reuse the existing bubble; pass null for location to use existing location.
+3 −8
Original line number Diff line number Diff line
@@ -241,20 +241,15 @@ public class BubbleTransitions {

    /**
     * Initiates axed bubble-to-bubble launch/existing bubble convert for the given transition.
     *
     * @return whether a new transition was started for the launch
     */
    public boolean startBubbleToBubbleLaunchOrExistingBubbleConvert(@NonNull IBinder transition,
    public void startBubbleToBubbleLaunchOrExistingBubbleConvert(@NonNull IBinder transition,
            @NonNull ActivityManager.RunningTaskInfo launchingTask,
            @NonNull Consumer<TransitionHandler> onInflatedCallback) {
        TransitionHandler handler =
        final TransitionHandler handler =
                mBubbleController.expandStackAndSelectBubbleForExistingTransition(
                        launchingTask, transition, onInflatedCallback);
        if (handler != null) {
        mEnterTransitions.put(transition, handler);
    }
        return handler != null;
    }

    /**
     * Starts a new launch or convert transition to show the given bubble.
+1 −5
Original line number Diff line number Diff line
@@ -437,7 +437,7 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition {
        // 3. Switch the expanded bubble for notification launch
        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, " Animating a mixed transition for "
                + "entering bubble from another bubbled task or for an existing bubble");
        final boolean started = bubbleTransitions.startBubbleToBubbleLaunchOrExistingBubbleConvert(
        bubbleTransitions.startBubbleToBubbleLaunchOrExistingBubbleConvert(
                transition, change.getTaskInfo(), handler -> {
                    final Transitions.TransitionHandler h = bubbleTransitions
                            .getRunningEnterTransition(transition);
@@ -446,10 +446,6 @@ class DefaultMixedTransition extends DefaultMixedHandler.MixedTransition {
                    h.startAnimation(
                            transition, info, startTransaction, finishTransaction, finishCallback);
                });
        if (!started) {
            // If nothing started, we are still consuming it since nothing else should handle it
            finishCallback.onTransitionFinished(null);
        }
        return true;
    }