Using model-time scrolling in all apps

This should solve flakes when the test thread wakes up too rarely to
inject enough touch events.

Change-Id: I461583d35eb4bfe0192b81c242aacf8d20e353d1
This commit is contained in:
vadimt
2019-05-10 19:51:22 -07:00
parent fc65c357a1
commit 3d13f303ee
7 changed files with 95 additions and 32 deletions

View File

@@ -32,7 +32,8 @@ import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.R;
import com.android.launcher3.graphics.DrawableFactory;
import com.android.launcher3.Utilities;
import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.logging.StatsLogUtils.LogContainerProvider;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
@@ -419,4 +420,13 @@ public class AllAppsRecyclerView extends BaseRecyclerView implements LogContaine
public boolean hasOverlappingRendering() {
return false;
}
@Override
public void onScrollStateChanged(int state) {
super.onScrollStateChanged(state);
if (state == SCROLL_STATE_IDLE && Utilities.IS_RUNNING_IN_TEST_HARNESS) {
AccessibilityManagerCompat.sendScrollFinishedEventToTest(getContext());
}
}
}