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

Commit 5a49f5b6 authored by Louis Chang's avatar Louis Chang
Browse files

Remove BubbleTaskViewTransitions

This is a cleanup that the BubbleTaskViewTransitions is no longer
needed because the Bubble transitions are now handled by the
default mixed handler

Sets the trampoline Task to be always-on-top when the bubble Task
is created instead.

Bug: 388651207
Test: launch Calendar to bubble
Flag: com.android.wm.shell.enable_create_any_bubble
Change-Id: I089f5ca53597a6d7ae160e23b32cfaa47652c637
parent 41673d37
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -379,8 +379,8 @@ public class BubbleController implements ConfigurationChangeListener,
        mDisplayController = displayController;
        final TaskViewTransitions tvTransitions;
        if (TaskViewTransitions.useRepo()) {
            tvTransitions = new BubbleTaskViewTransitions(transitions, taskViewRepository,
                    organizer, syncQueue);
            tvTransitions = new TaskViewTransitions(transitions, taskViewRepository, organizer,
                    syncQueue);
        } else {
            tvTransitions = taskViewTransitions;
        }
+1 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@ public class BubbleTaskViewListener implements TaskView.Listener {
        final TaskViewTaskController tvc = mTaskView.getController();
        final WindowContainerToken token = tvc.getTaskToken();
        final WindowContainerTransaction wct = new WindowContainerTransaction();
        wct.setAlwaysOnTop(token, true /* alwaysOnTop */);
        if (com.android.window.flags.Flags.excludeTaskFromRecents()) {
            wct.setTaskForceExcludedFromRecents(token, true /* forceExcluded */);
        }
+0 −48
Original line number Diff line number Diff line
/*
 * Copyright (C) 2025 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.wm.shell.bubbles;

import android.app.ActivityManager;
import android.view.SurfaceControl;
import android.window.WindowContainerTransaction;

import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.taskview.TaskViewRepository;
import com.android.wm.shell.taskview.TaskViewTaskController;
import com.android.wm.shell.taskview.TaskViewTransitions;
import com.android.wm.shell.transition.Transitions;

public class BubbleTaskViewTransitions extends TaskViewTransitions {

    public BubbleTaskViewTransitions(Transitions transitions, TaskViewRepository repository,
            ShellTaskOrganizer taskOrganizer, SyncTransactionQueue syncQueue) {
        super(transitions, repository, taskOrganizer, syncQueue);
    }

    @Override
    public void prepareOpenAnimation(TaskViewTaskController taskView, boolean newTask,
            SurfaceControl.Transaction startTransaction,
            SurfaceControl.Transaction finishTransaction, ActivityManager.RunningTaskInfo taskInfo,
            SurfaceControl leash, WindowContainerTransaction wct) {
        if (!taskInfo.getConfiguration().windowConfiguration.isAlwaysOnTop()) {
            wct.setAlwaysOnTop(taskInfo.token, true /* alwaysOnTop */);
        }
        super.prepareOpenAnimation(taskView, newTask, startTransaction, finishTransaction, taskInfo,
                leash, wct);
    }
}