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

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2020-06-23 01:33:55 +00:00
commit 7551b6191f
1 file changed
+2 -1
@@ -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());