[Android] More blind fixes for SlidingMenu

Jean-Baptiste Kempf git at videolan.org
Wed Oct 31 11:35:58 CET 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Oct 31 11:25:21 2012 +0100| [9db12a68eab98b422b27ea29e35a3501999bf32b] | committer: Jean-Baptiste Kempf

More blind fixes for SlidingMenu

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=9db12a68eab98b422b27ea29e35a3501999bf32b
---

 java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java b/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
index 44d4a9e..744b07e 100644
--- a/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
+++ b/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
@@ -780,11 +780,11 @@ public class CustomViewAbove extends ViewGroup {
 		switch (action) {
 		case MotionEvent.ACTION_MOVE:
 			final int activePointerId = mActivePointerId;
-			if (activePointerId == INVALID_POINTER)
+			if (activePointerId == INVALID_POINTER || activePointerId >= ev.getPointerCount())
 				break;
 
 			final int pointerIndex = MotionEventCompat.findPointerIndex(ev, activePointerId);
-			if (pointerIndex==-1) {
+			if (pointerIndex==-1 || activePointerId >= ev.getPointerCount()) {
 			    mActivePointerId = INVALID_POINTER;
 			    break;
 			}



More information about the Android mailing list