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

Commit ae76bebf authored by vadimt's avatar vadimt
Browse files

More diags for non-receiving scroll end

Bug: 160238801
Change-Id: I2e19d16e49e84e93bdf135eb97d5f033475305e8
parent 5173a4c9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -97,6 +97,9 @@ public class AccessibilityManagerCompat {
                AccessibilityEvent.TYPE_ANNOUNCEMENT);
        e.setClassName(eventTag);
        e.setParcelableData(data);
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "sendEventToTest " + e);
        }
        accessibilityManager.sendAccessibilityEvent(e);
    }

+6 −1
Original line number Diff line number Diff line
@@ -635,9 +635,11 @@ public final class LauncherInstrumentation {
    Parcelable executeAndWaitForEvent(Runnable command,
            UiAutomation.AccessibilityEventFilter eventFilter, Supplier<String> message) {
        try {
            Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "executeAndWaitForEvent: before");
            final AccessibilityEvent event =
                    mInstrumentation.getUiAutomation().executeAndWaitForEvent(
                            command, eventFilter, WAIT_TIME_MS);
            Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "executeAndWaitForEvent: after");
            assertNotNull("executeAndWaitForEvent returned null (this can't happen)", event);
            final Parcelable parcelableData = event.getParcelableData();
            event.recycle();
@@ -1094,7 +1096,10 @@ public final class LauncherInstrumentation {
        executeAndWaitForEvent(
                () -> linearGesture(
                        startX, startY, endX, endY, steps, slowDown, GestureScope.INSIDE),
                event -> TestProtocol.SCROLL_FINISHED_MESSAGE.equals(event.getClassName()),
                event -> {
                    Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "scroll: received event: " + event);
                    return TestProtocol.SCROLL_FINISHED_MESSAGE.equals(event.getClassName());
                },
                () -> "Didn't receive a scroll end message: " + startX + ", " + startY
                        + ", " + endX + ", " + endY);
    }