[Android] SlidingPaneLayout: remove useless code

Adrien Maglo git at videolan.org
Fri Jan 31 09:27:55 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Jan 31 09:27:46 2014 +0100| [03704c112b6129a7b5541353390f5bcf38286c20] | committer: Adrien Maglo

SlidingPaneLayout: remove useless code

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

 .../org/videolan/vlc/widget/SlidingPaneLayout.java |   30 --------------------
 1 file changed, 30 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java b/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java
index 37ea781..f3dd51a 100644
--- a/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java
+++ b/vlc-android/src/org/videolan/vlc/widget/SlidingPaneLayout.java
@@ -558,36 +558,6 @@ public class SlidingPaneLayout extends ViewGroup {
         }
         catch (IllegalArgumentException ex) { }
 
-        final int action = ev.getAction();
-
-        switch (action & MotionEventCompat.ACTION_MASK) {
-            case MotionEvent.ACTION_DOWN: {
-                final float x = ev.getX();
-                final float y = ev.getY();
-                mInitialMotionX = x;
-                mInitialMotionY = y;
-                break;
-            }
-
-            case MotionEvent.ACTION_UP: {
-                final float x = ev.getX();
-                final float y = ev.getY();
-                final float dx = x - mInitialMotionX;
-                final float dy = y - mInitialMotionY;
-                final int slop = mDragHelper.getTouchSlop();
-                if (dx * dx + dy * dy < slop * slop &&
-                    mDragHelper.isViewUnder(mSlideableView, (int) x, (int) y)) {
-                    // Close or open the pane on touch event.
-                    if (getState() == STATE_OPENED)
-                        closePane();
-                    else if (getState() == STATE_CLOSED)
-                        openPane();
-                    break;
-                }
-                break;
-            }
-        }
-
         return true;
     }
 



More information about the Android mailing list