Merge "Reset target, update pointer" into rvc-dev am: fb64e7f0ac

Change-Id: Idf906d330ce305b1d001fb85f9e599721cfbe7bc
This commit is contained in:
Lyn Han
2020-03-31 20:20:35 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 3 deletions

View File

@@ -947,7 +947,6 @@ public class BubbleStackView extends FrameLayout {
new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT)); new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters); ViewClippingUtil.setClippingDeactivated(bubble.getIconView(), true, mClippingParameters);
animateInFlyoutForBubble(bubble); animateInFlyoutForBubble(bubble);
updatePointerPosition();
requestUpdate(); requestUpdate();
logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__POSTED); logBubbleEvent(bubble, SysUiStatsLog.BUBBLE_UICHANGED__ACTION__POSTED);
} }
@@ -1005,8 +1004,8 @@ public class BubbleStackView extends FrameLayout {
Bubble bubble = bubbles.get(i); Bubble bubble = bubbles.get(i);
mBubbleContainer.reorderView(bubble.getIconView(), i); mBubbleContainer.reorderView(bubble.getIconView(), i);
} }
updateBubbleZOrdersAndDotPosition(false /* animate */); updateBubbleZOrdersAndDotPosition(false /* animate */);
updatePointerPosition();
} }
void showOverflow() { void showOverflow() {
@@ -1394,7 +1393,7 @@ public class BubbleStackView extends FrameLayout {
/** Called when a drag operation on an individual bubble has started. */ /** Called when a drag operation on an individual bubble has started. */
public void onBubbleDragStart(View bubble) { public void onBubbleDragStart(View bubble) {
if (DEBUG_BUBBLE_STACK_VIEW) { if (DEBUG_BUBBLE_STACK_VIEW) {
Log.d(TAG, "onBubbleDragStart: bubble=" + bubble); Log.d(TAG, "onBubbleDragStart: bubble=" + ((BadgedImageView) bubble).getKey());
} }
if (mBubbleOverflow != null && bubble.equals(mBubbleOverflow.getIconView())) { if (mBubbleOverflow != null && bubble.equals(mBubbleOverflow.getIconView())) {
@@ -1909,6 +1908,9 @@ public class BubbleStackView extends FrameLayout {
return; return;
} }
int index = getBubbleIndex(mExpandedBubble); int index = getBubbleIndex(mExpandedBubble);
if (index == -1) {
return;
}
float bubbleLeftFromScreenLeft = mExpandedAnimationController.getBubbleLeft(index); float bubbleLeftFromScreenLeft = mExpandedAnimationController.getBubbleLeft(index);
float halfBubble = mBubbleSize / 2f; float halfBubble = mBubbleSize / 2f;
float bubbleCenter = bubbleLeftFromScreenLeft + halfBubble; float bubbleCenter = bubbleLeftFromScreenLeft + halfBubble;

View File

@@ -364,6 +364,7 @@ public class ExpandedAnimationController
/** Resets bubble drag out gesture flags. */ /** Resets bubble drag out gesture flags. */
public void onGestureFinished() { public void onGestureFinished() {
mBubbleDraggedOutEnough = false; mBubbleDraggedOutEnough = false;
mMagnetizedBubbleDraggingOut = null;
updateBubblePositions(); updateBubblePositions();
} }