Merge "Fix selection after dismissal" into tm-qpr-dev am: 7ce3792d9e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18718666

Change-Id: Ib4eb2eedde36b4dd5f418385d2c98289c8d60b23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Mady Mellor
2022-06-06 18:25:15 +00:00
committed by Automerger Merge Worker

View File

@@ -96,6 +96,7 @@ import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.stream.Collectors;
@@ -2744,8 +2745,10 @@ public class BubbleStackView extends FrameLayout
private void dismissBubbleIfExists(@Nullable BubbleViewProvider bubble) {
if (bubble != null && mBubbleData.hasBubbleInStackWithKey(bubble.getKey())) {
if (mIsExpanded && mBubbleData.getBubbles().size() > 1) {
// If we have more than 1 bubble we will perform the switch animation
if (mIsExpanded && mBubbleData.getBubbles().size() > 1
&& Objects.equals(bubble, mExpandedBubble)) {
// If we have more than 1 bubble and it's the current bubble being dismissed,
// we will perform the switch animation
mIsBubbleSwitchAnimating = true;
}
mBubbleData.dismissBubbleWithKey(bubble.getKey(), Bubbles.DISMISS_USER_GESTURE);