Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +10 −0 Original line number Diff line number Diff line Loading @@ -692,10 +692,20 @@ public class BubbleStackView extends FrameLayout { if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "addBubble: " + bubble); } if (mBubbleContainer.getChildCount() == 0) { mStackOnLeftOrWillBe = mStackAnimationController.isStackOnLeftSide(); } bubble.inflate(mInflater, this); bubble.getIconView().setBubbleIconFactory(mBubbleIconFactory); bubble.getIconView().updateViews(); // Set the dot position to the opposite of the side the stack is resting on, since the stack // resting slightly off-screen would result in the dot also being off-screen. bubble.getIconView().setDotPosition( !mStackOnLeftOrWillBe /* onLeft */, false /* animate */); mBubbleContainer.addView(bubble.getIconView(), 0, new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT)); ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters); Loading packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java +3 −13 Original line number Diff line number Diff line Loading @@ -271,15 +271,6 @@ public class StackAnimationController extends .setDampingRatio(SPRING_AFTER_FLING_DAMPING_RATIO), /* destination */ null); setEndActionForMultipleProperties( () -> { mRestingStackPosition = new PointF(); mRestingStackPosition.set(mStackPosition); removeEndActionForProperty(DynamicAnimation.TRANSLATION_X); removeEndActionForProperty(DynamicAnimation.TRANSLATION_Y); }, DynamicAnimation.TRANSLATION_X, DynamicAnimation.TRANSLATION_Y); // If we're flinging now, there's no more touch event to catch up to. mFirstBubbleSpringingToTouch = false; mIsMovingFromFlinging = true; Loading Loading @@ -368,6 +359,9 @@ public class StackAnimationController extends .addEndListener((animation, canceled, endValue, endVelocity) -> { if (!canceled) { mRestingStackPosition = new PointF(); mRestingStackPosition.set(mStackPosition); springFirstBubbleWithStackFollowing(property, spring, endVelocity, finalPosition != null ? finalPosition Loading Loading @@ -664,10 +658,6 @@ public class StackAnimationController extends if (mLayout.getChildCount() > 0) { animationForChildAtIndex(0).translationX(mStackPosition.x).start(); } else { // Set the start position back to the default since we're out of bubbles. New bubbles // will then animate in from the start position. mStackPosition = getDefaultStartPosition(); } } Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +10 −0 Original line number Diff line number Diff line Loading @@ -692,10 +692,20 @@ public class BubbleStackView extends FrameLayout { if (DEBUG_BUBBLE_STACK_VIEW) { Log.d(TAG, "addBubble: " + bubble); } if (mBubbleContainer.getChildCount() == 0) { mStackOnLeftOrWillBe = mStackAnimationController.isStackOnLeftSide(); } bubble.inflate(mInflater, this); bubble.getIconView().setBubbleIconFactory(mBubbleIconFactory); bubble.getIconView().updateViews(); // Set the dot position to the opposite of the side the stack is resting on, since the stack // resting slightly off-screen would result in the dot also being off-screen. bubble.getIconView().setDotPosition( !mStackOnLeftOrWillBe /* onLeft */, false /* animate */); mBubbleContainer.addView(bubble.getIconView(), 0, new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT)); ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters); Loading
packages/SystemUI/src/com/android/systemui/bubbles/animation/StackAnimationController.java +3 −13 Original line number Diff line number Diff line Loading @@ -271,15 +271,6 @@ public class StackAnimationController extends .setDampingRatio(SPRING_AFTER_FLING_DAMPING_RATIO), /* destination */ null); setEndActionForMultipleProperties( () -> { mRestingStackPosition = new PointF(); mRestingStackPosition.set(mStackPosition); removeEndActionForProperty(DynamicAnimation.TRANSLATION_X); removeEndActionForProperty(DynamicAnimation.TRANSLATION_Y); }, DynamicAnimation.TRANSLATION_X, DynamicAnimation.TRANSLATION_Y); // If we're flinging now, there's no more touch event to catch up to. mFirstBubbleSpringingToTouch = false; mIsMovingFromFlinging = true; Loading Loading @@ -368,6 +359,9 @@ public class StackAnimationController extends .addEndListener((animation, canceled, endValue, endVelocity) -> { if (!canceled) { mRestingStackPosition = new PointF(); mRestingStackPosition.set(mStackPosition); springFirstBubbleWithStackFollowing(property, spring, endVelocity, finalPosition != null ? finalPosition Loading Loading @@ -664,10 +658,6 @@ public class StackAnimationController extends if (mLayout.getChildCount() > 0) { animationForChildAtIndex(0).translationX(mStackPosition.x).start(); } else { // Set the start position back to the default since we're out of bubbles. New bubbles // will then animate in from the start position. mStackPosition = getDefaultStartPosition(); } } Loading