Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3296181 authored by Ats Jenk's avatar Ats Jenk
Browse files

Add debug logs to root cause drag test failure

DragAndDismiss test is still failing. From the video I can see that the
dismiss view is shown, but it does not react to the dragged bubble. And
the dragged bubble is not moving into it.
Adding some logs to track the instances of dismiss view itself and
magnetic target. They do get recreated. Want to confirm that the issue
is not from this.

Bug: 417749498
Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.bubble.DragAndDismiss
Flag: EXEMPT, adding logging
Change-Id: I1210f631938731c4e6ee2cde79ce748cf8d62b30
parent e0c0a7f5
Loading
Loading
Loading
Loading
+18 −9
Original line number Diff line number Diff line
@@ -655,7 +655,9 @@ public class BubbleStackView extends FrameLayout
            } else {
                // TODO(b/417749498): Delete debug log
                ProtoLog.v(
                        WM_SHELL_BUBBLES_NOISY, "BubbleStackView.bubbleDrag.onDown: isCollapsed");
                        WM_SHELL_BUBBLES_NOISY,
                        "BubbleStackView.bubbleDrag.onDown: isCollapsed magneticTarget(%d)",
                        (mMagneticTarget != null ? mMagneticTarget.hashCode() : -1));
                // If we're collapsed, prepare to drag the stack. Cancel active animations, set the
                // animation controller, and hide the flyout.
                mStackAnimationController.cancelStackPositionAnimations();
@@ -762,10 +764,10 @@ public class BubbleStackView extends FrameLayout
            // released in the target or flung out of it, and we should ignore the event.
            if (!passEventToMagnetizedObject(ev)) {
                // TODO(b/417749498): Delete debug log
                ProtoLog.v(
                        WM_SHELL_BUBBLES_NOISY,
                ProtoLog.v(WM_SHELL_BUBBLES_NOISY,
                        "BubbleStackView.bubbleDrag.onUp: magnetized object not handling"
                                + " event");
                                + " event magneticTarget(%d)",
                        (mMagneticTarget != null ? mMagneticTarget.hashCode() : -1));
                if (mBubbleData.isExpanded()) {
                    mExpandedAnimationController.snapBubbleBack(v, velX, velY);

@@ -786,15 +788,16 @@ public class BubbleStackView extends FrameLayout
                // TODO(b/417749498): Delete debug log
                ProtoLog.v(
                        WM_SHELL_BUBBLES_NOISY,
                        "BubbleStackView.bubbleDrag.onUp: hide dismiss view");
                        "BubbleStackView.bubbleDrag.onUp: hide dismissView(%d)",
                        mDismissView.hashCode());
                mDismissView.hide();
            } else {
                // TODO(b/417749498): Delete debug log
                ProtoLog.v(
                        WM_SHELL_BUBBLES_NOISY,
                        "BubbleStackView.bubbleDrag.onUp: magnetized object handling up");
                ProtoLog.v(WM_SHELL_BUBBLES_NOISY,
                        "BubbleStackView.bubbleDrag.onUp: magnetized object handling up "
                                + "magneticTarget(%d)",
                        (mMagneticTarget != null ? mMagneticTarget.hashCode() : -1));
            }

            onDraggingEnded();

            // Hide the stack after a delay, if needed.
@@ -1413,6 +1416,8 @@ public class BubbleStackView extends FrameLayout

    private void setUpDismissView() {
        if (mDismissView != null) {
            // TODO(b/417749498): Delete debug log
            ProtoLog.v(WM_SHELL_BUBBLES_NOISY, "BubbleStackView.setUpDismissView remove previous");
            removeView(mDismissView);
        }
        mDismissView = new DismissView(getContext());
@@ -1430,6 +1435,10 @@ public class BubbleStackView extends FrameLayout
        // MagnetizedObjects when the dismiss view gets shown.
        mMagneticTarget = new MagnetizedObject.MagneticTarget(
                mDismissView.getCircle(), dismissRadius);
        // TODO(b/417749498): Delete debug log
        ProtoLog.v(WM_SHELL_BUBBLES_NOISY,
                "BubbleStackView.setUpDismissView create new dismissView(%d) magneticTarget(%d)",
                mDismissView.hashCode(), mMagneticTarget.hashCode());
        mBubbleContainer.bringToFront();
    }