Add delay between motion events in hold-to-drag gesture
Ib57be0ce8b63aaa17ecc57b70d1629ab88c69787 replaced tests that entered
desktop mode via drag using UiDevice.drag() with a custom set of
injected motion events that held the gesture after touching down and
before starting the move for 100ms to satisfy the new hold-to-drag
changes to the App Handler.
The injected events did not wait for 5ms before each step of the
drag/move like UiDevice.drag() does, which made the gesture much faster
in tests and caused the release-into-desktop CUJ to start earlier and
overlap with a PIP CUJ. This overlap that did not exist before caused
each CUJ to have inflated blocking-calls from counting calls from both
CUJs, which leads to performance regression reports.
While there's not necesarilly an overall increase in calls made in the
original change, waiting 5ms between motion events is generally a good
practice so that there's a preset delay instead of varying speeds
depending on the device under test, so this change adds the 5ms to
revert back to the original speed as when it used UiDevice.drag().
Flag: EXEMPT bugfix
Fix: 371448328
Test: atest DragAppWindowMultiWindowAndPipMicrobenchmark#dragAppWindow,
check in perfetto that the PIP and APP_HANDLE release CUJs don't overlap
Change-Id: I7e8feb33a898e20dcc231a04ade79f4c111f17ab
2 files changed