From bd35768386ff3d2961773b401b92823556a4ee42 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Fri, 24 Mar 2023 15:55:20 -0700 Subject: Cancel merges in RecentsTransitionHandler if it's always on top Merging the bubble open animation with the recents animation results in a bad and unrecoverable state for bubbles so skip the merge. Test: manual - 1) have a bubble and a normal activity open 2) swipe up to go home and tap on the bubble quickly => observe the bubble opens normally Bug: 273966970 Change-Id: I577663869897b8781b0d5e670097afdb5b8b8524 --- .../src/com/android/wm/shell/recents/RecentsTransitionHandler.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java index db75be75788a..5c64177ae835 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentsTransitionHandler.java @@ -418,6 +418,13 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler { for (int i = 0; i < info.getChanges().size(); ++i) { final TransitionInfo.Change change = info.getChanges().get(i); final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo(); + if (taskInfo != null + && taskInfo.configuration.windowConfiguration.isAlwaysOnTop()) { + // Tasks that are always on top (e.g. bubbles), will handle their own transition + // as they are on top of everything else. So cancel the merge here. + cancel(); + return; + } hasTaskChange = hasTaskChange || taskInfo != null; final boolean isLeafTask = leafTaskFilter.test(change); if (TransitionUtil.isOpeningType(change.getMode())) { -- cgit v1.2.3-59-g8ed1b