summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
index e69fe31fa9e1..ec45f93b38ee 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java
@@ -362,6 +362,10 @@ public class BubbleStackView extends FrameLayout
new MagnetizedObject.MagnetListener() {
@Override
public void onStuckToTarget(@NonNull MagnetizedObject.MagneticTarget target) {
+ if (mExpandedAnimationController.getDraggedOutBubble() == null) {
+ return;
+ }
+
animateDesaturateAndDarken(
mExpandedAnimationController.getDraggedOutBubble(), true);
}
@@ -369,6 +373,10 @@ public class BubbleStackView extends FrameLayout
@Override
public void onUnstuckFromTarget(@NonNull MagnetizedObject.MagneticTarget target,
float velX, float velY, boolean wasFlungOut) {
+ if (mExpandedAnimationController.getDraggedOutBubble() == null) {
+ return;
+ }
+
animateDesaturateAndDarken(
mExpandedAnimationController.getDraggedOutBubble(), false);
@@ -383,6 +391,10 @@ public class BubbleStackView extends FrameLayout
@Override
public void onReleasedInTarget(@NonNull MagnetizedObject.MagneticTarget target) {
+ if (mExpandedAnimationController.getDraggedOutBubble() == null) {
+ return;
+ }
+
mExpandedAnimationController.dismissDraggedOutBubble(
mExpandedAnimationController.getDraggedOutBubble() /* bubble */,
mDismissTargetContainer.getHeight() /* translationYBy */,