Removing flinging via UI Automator

UI Automator loses events. Switching to the homemade scrolling.

Bug: 138729157
Change-Id: Ib09bd5714e83eadfc65b54202867bf375e6b47c5
This commit is contained in:
vadimt
2019-09-04 12:08:27 -07:00
parent 5e893727f8
commit 758a1d983d
4 changed files with 24 additions and 26 deletions

View File

@@ -22,6 +22,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.views.RecyclerViewFastScroller;
import androidx.recyclerview.widget.RecyclerView;
@@ -171,4 +172,13 @@ public abstract class BaseRecyclerView extends RecyclerView {
* <p>Override in each subclass of this base class.
*/
public void onFastScrollCompleted() {}
@Override
public void onScrollStateChanged(int state) {
super.onScrollStateChanged(state);
if (state == SCROLL_STATE_IDLE) {
AccessibilityManagerCompat.sendScrollFinishedEventToTest(getContext());
}
}
}