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
This commit is contained in:
Mady Mellor
2023-03-24 15:55:20 -07:00
parent bb5a64213a
commit bd35768386

View File

@@ -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())) {