TouchInteractionController: allow state transitions from STATE_DRAG.

This is necessary to make the drag -> delegate execution path work.
Bug: 159651900
Test: atest TouchInteractionControllerTest

Change-Id: Idfb5d5ea8290353a7f4dac9742826a38fdd17b04
This commit is contained in:
Ameer Armaly
2022-01-31 13:03:42 -08:00
parent 92a9e6a02d
commit 7429d9b386

View File

@@ -376,7 +376,7 @@ public final class TouchInteractionController {
throw new IllegalStateException(
"State transitions are not allowed without first adding a callback.");
}
if (mState != STATE_TOUCH_INTERACTING) {
if (mState != STATE_TOUCH_INTERACTING && mState != STATE_DRAGGING) {
throw new IllegalStateException(
"State transitions are not allowed in " + stateToString(mState));
}