From 7429d9b386ef11d7d79e5e4fedb15e8cf2063f3d Mon Sep 17 00:00:00 2001 From: Ameer Armaly Date: Mon, 31 Jan 2022 13:03:42 -0800 Subject: [PATCH] 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 --- .../accessibilityservice/TouchInteractionController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/accessibilityservice/TouchInteractionController.java b/core/java/android/accessibilityservice/TouchInteractionController.java index bb2b8d45fd619..735df805b8726 100644 --- a/core/java/android/accessibilityservice/TouchInteractionController.java +++ b/core/java/android/accessibilityservice/TouchInteractionController.java @@ -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)); }