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

Commit bc89d176 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Debug tracing to repro a flake" into ub-launcher3-master

parents ee24e84a ac752e39
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.launcher3;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@@ -25,6 +26,7 @@ import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;

import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.views.RecyclerViewFastScroller;


@@ -177,6 +179,10 @@ public abstract class BaseRecyclerView extends RecyclerView {
    public void onScrollStateChanged(int state) {
        super.onScrollStateChanged(state);

        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "onScrollStateChanged: " + state);
        }

        if (state == SCROLL_STATE_IDLE) {
            AccessibilityManagerCompat.sendScrollFinishedEventToTest(getContext());
        }
+3 −0
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@ public class AccessibilityManagerCompat {
    }

    public static void sendScrollFinishedEventToTest(Context context) {
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.NO_SCROLL_END_WIDGETS, "sendScrollFinishedEventToTest");
        }
        final AccessibilityManager accessibilityManager = getAccessibilityManagerForTest(context);
        if (accessibilityManager == null) return;

+1 −0
Original line number Diff line number Diff line
@@ -95,4 +95,5 @@ public final class TestProtocol {

    public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824";
    public static final String APP_NOT_DISABLED = "b/139891609";
    public static final String NO_SCROLL_END_WIDGETS = "b/152354290";
}