diff options
author | Joey Grover <joeygrover@gmail.com> | 2018-06-12 13:56:18 -0400 |
---|---|---|
committer | Joey Grover <joeygrover@gmail.com> | 2018-06-12 13:56:18 -0400 |
commit | 31a4fe6158292d655215ccf25c7b34b40503d867 (patch) | |
tree | 626221e81d07f04abe33a440b6d4a281a3adb0f5 | |
parent | ed5b40bc5878dadfea39994e71b44c21cb6a39a0 (diff) | |
download | sdl_android-feature/fix_vpm_multi_touch.tar.gz |
Clear sdlMotionEvent reference if event is overfeature/fix_vpm_multi_touch
-rw-r--r-- | sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java index 8b04328b9..3ddf57c8e 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java @@ -6587,8 +6587,14 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> int eventAction = sdlMotionEvent.getMotionEvent(touchType, pointerProperties);
- return android.view.MotionEvent.obtain(sdlMotionEvent.startOfEvent, sdlMotionEvent.getEventTime(), eventAction, eventListSize, pointerProperties, pointerCoords, 0, 0,1,1,0,0, InputDevice.SOURCE_TOUCHSCREEN,0);
+ MotionEvent motionEvent = android.view.MotionEvent.obtain(sdlMotionEvent.startOfEvent, sdlMotionEvent.getEventTime(), eventAction, eventListSize, pointerProperties, pointerCoords, 0, 0,1,1,0,0, InputDevice.SOURCE_TOUCHSCREEN,0);
+ //If the motion event should be finished we should clear our reference
+ if(eventAction == MotionEvent.ACTION_UP || eventAction == MotionEvent.ACTION_CANCEL){
+ sdlMotionEvent = null;
+ }
+
+ return motionEvent;
}
|