diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java index 819c4737ea..d911fd472d 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java @@ -647,7 +647,9 @@ public class BubbleBarView extends FrameLayout { } setAlphaDuringBubbleDrag(1f); setTranslationX(0f); - setAlpha(1f); + if (getBubbleChildCount() > 0) { + setAlpha(1f); + } } /** diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragAnimator.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragAnimator.java index 7aed2d2abe..87f466f5d3 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragAnimator.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleDragAnimator.java @@ -128,7 +128,7 @@ public class BubbleDragAnimator { boolean wasFling, boolean canceled, float finalValue, float finalVelocity, boolean allRelevantPropertyAnimationsEnded) -> { if (canceled || allRelevantPropertyAnimationsEnded) { - resetAnimatedViews(restingPosition); + resetAnimatedViews(restingPosition, /* dismissed= */ false); if (endActions != null) { endActions.run(); } @@ -197,7 +197,7 @@ public class BubbleDragAnimator { boolean wasFling, boolean canceled, float finalValue, float finalVelocity, boolean allRelevantPropertyAnimationsEnded) -> { if (canceled || allRelevantPropertyAnimationsEnded) { - resetAnimatedViews(initialPosition); + resetAnimatedViews(initialPosition, /* dismissed= */ true); if (endActions != null) endActions.run(); } }) @@ -208,11 +208,14 @@ public class BubbleDragAnimator { * Reset the animated views to the initial state * * @param initialPosition position of the bubble + * @param dismissed whether the animated view was dismissed */ - private void resetAnimatedViews(@NonNull PointF initialPosition) { + private void resetAnimatedViews(@NonNull PointF initialPosition, boolean dismissed) { mView.setScaleX(1f); mView.setScaleY(1f); - mView.setAlpha(1f); + if (!dismissed) { + mView.setAlpha(1f); + } mView.setTranslationX(initialPosition.x); mView.setTranslationY(initialPosition.y);