Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +16 −9 Original line number Diff line number Diff line Loading @@ -238,14 +238,14 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F */ public void setExpandedBubble(BubbleView bubbleToExpand) { mExpandedBubble = bubbleToExpand; boolean prevExpanded = mIsExpanded; mIsExpanded = true; if (!prevExpanded) { if (!mIsExpanded) { // If we weren't previously expanded we should animate open. animateExpansion(true /* expand */); } else { // If we were expanded just update the views // Otherwise just update the views // TODO: probably animate / page to expanded one updateExpandedBubble(); updatePointerPosition(); requestUpdate(); } mExpandedBubble.getEntry().setShowInShadeWhenBubble(false); Loading Loading @@ -387,7 +387,6 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F mIsExpanded = shouldExpand; updateExpandedBubble(); applyCurrentState(); //requestUpdate(); mIsAnimating = true; Loading @@ -400,7 +399,10 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F if (shouldExpand) { mBubbleContainer.setController(mExpandedAnimationController); mExpandedAnimationController.expandFromStack( mStackAnimationController.getStackPosition(), updateAfter); mStackAnimationController.getStackPosition(), () -> { updatePointerPosition(); updateAfter.run(); }); } else { mBubbleContainer.cancelAllAnimations(); mExpandedAnimationController.collapseBackToStack( Loading Loading @@ -649,10 +651,7 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F } // Bubble with notification as expanded state doesn't need a header / title mExpandedViewContainer.setHeaderText(null); } float pointerPosition = mExpandedBubble.getPosition().x + (mExpandedBubble.getWidth() / 2); mExpandedViewContainer.setPointerPosition((int) pointerPosition); } private void applyCurrentState() { Loading Loading @@ -690,6 +689,14 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F } } private void updatePointerPosition() { if (mExpandedBubble != null) { float pointerPosition = mExpandedBubble.getPosition().x + (mExpandedBubble.getWidth() / 2f); mExpandedViewContainer.setPointerPosition((int) pointerPosition); } } private void applyRowState(ExpandableNotificationRow view) { view.reset(); view.setHeadsUp(false); Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +16 −9 Original line number Diff line number Diff line Loading @@ -238,14 +238,14 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F */ public void setExpandedBubble(BubbleView bubbleToExpand) { mExpandedBubble = bubbleToExpand; boolean prevExpanded = mIsExpanded; mIsExpanded = true; if (!prevExpanded) { if (!mIsExpanded) { // If we weren't previously expanded we should animate open. animateExpansion(true /* expand */); } else { // If we were expanded just update the views // Otherwise just update the views // TODO: probably animate / page to expanded one updateExpandedBubble(); updatePointerPosition(); requestUpdate(); } mExpandedBubble.getEntry().setShowInShadeWhenBubble(false); Loading Loading @@ -387,7 +387,6 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F mIsExpanded = shouldExpand; updateExpandedBubble(); applyCurrentState(); //requestUpdate(); mIsAnimating = true; Loading @@ -400,7 +399,10 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F if (shouldExpand) { mBubbleContainer.setController(mExpandedAnimationController); mExpandedAnimationController.expandFromStack( mStackAnimationController.getStackPosition(), updateAfter); mStackAnimationController.getStackPosition(), () -> { updatePointerPosition(); updateAfter.run(); }); } else { mBubbleContainer.cancelAllAnimations(); mExpandedAnimationController.collapseBackToStack( Loading Loading @@ -649,10 +651,7 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F } // Bubble with notification as expanded state doesn't need a header / title mExpandedViewContainer.setHeaderText(null); } float pointerPosition = mExpandedBubble.getPosition().x + (mExpandedBubble.getWidth() / 2); mExpandedViewContainer.setPointerPosition((int) pointerPosition); } private void applyCurrentState() { Loading Loading @@ -690,6 +689,14 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F } } private void updatePointerPosition() { if (mExpandedBubble != null) { float pointerPosition = mExpandedBubble.getPosition().x + (mExpandedBubble.getWidth() / 2f); mExpandedViewContainer.setPointerPosition((int) pointerPosition); } } private void applyRowState(ExpandableNotificationRow view) { view.reset(); view.setHeadsUp(false); Loading