Merge "Store newGestureState before onConsumerAboutToBeSwitched clears it" into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot
2020-06-23 01:33:55 +00:00
committed by Android (Google) Code Review

View File

@@ -480,8 +480,9 @@ public class TouchInteractionService extends Service implements PluginListener<O
// Clone the previous gesture state since onConsumerAboutToBeSwitched might trigger
// onConsumerInactive and wipe the previous gesture state
GestureState prevGestureState = new GestureState(mGestureState);
mGestureState = createGestureState(mGestureState);
GestureState newGestureState = createGestureState(mGestureState);
mConsumer.onConsumerAboutToBeSwitched();
mGestureState = newGestureState;
mConsumer = newConsumer(prevGestureState, mGestureState, event);
ActiveGestureLog.INSTANCE.addLog("setInputConsumer: " + mConsumer.getName());