mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Fix TaplTestsNexus#testSearchForApp
This cl is 1/2 part change We are currently getting StaleObjectException when running this test. We want to implment a synchoronized event beetween test and launcher, so we know that search result adapter is done updating and page will get no more updates of search results. Test: Presubmit Bug: 232008758 Flag: not needed Change-Id: I40cf9b83d231a2487220aabc8f8e8c3ca71f255c
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.launcher3;
|
||||
import static com.android.app.animation.Interpolators.SCROLL;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isObservedEventType;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.SCROLL_FINISHED_MESSAGE;
|
||||
import static com.android.launcher3.touch.OverScroll.OVERSCROLL_DAMP_FACTOR;
|
||||
import static com.android.launcher3.touch.PagedOrientationHandler.VIEW_SCROLL_BY;
|
||||
import static com.android.launcher3.touch.PagedOrientationHandler.VIEW_SCROLL_TO;
|
||||
@@ -492,7 +493,8 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
*/
|
||||
protected void onPageEndTransition() {
|
||||
mCurrentPageScrollDiff = 0;
|
||||
AccessibilityManagerCompat.sendScrollFinishedEventToTest(getContext());
|
||||
AccessibilityManagerCompat.sendTestProtocolEventToTest(getContext(),
|
||||
SCROLL_FINISHED_MESSAGE);
|
||||
AccessibilityManagerCompat.sendCustomAccessibilityEvent(getPageAt(mCurrentPage),
|
||||
AccessibilityEvent.TYPE_VIEW_FOCUSED, null);
|
||||
if (mOnPageTransitionEndCallback != null) {
|
||||
|
||||
Reference in New Issue
Block a user