[Android] Revert "Catch onInterceptTouchEvent NullPointerException"
Geoffrey Métais
git at videolan.org
Thu Feb 23 10:51:24 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Feb 23 10:48:32 2017 +0100| [bf6bbd9c4b987c63465f6cd2e3fc1f78c280aa82] | committer: Geoffrey Métais
Revert "Catch onInterceptTouchEvent NullPointerException"
This reverts commit 766d8e8c39341b2a3f831e8e32ce7ea67960eea2.
> https://code.videolan.org/videolan/vlc-android/commit/bf6bbd9c4b987c63465f6cd2e3fc1f78c280aa82
---
vlc-android/res/layout/main.xml | 2 +-
vlc-android/res/layout/secondary.xml | 2 +-
.../vlc/gui/helpers/BottomSheetBehavior.java | 28 ----------------------
3 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/vlc-android/res/layout/main.xml b/vlc-android/res/layout/main.xml
index 09490dd..0228758 100644
--- a/vlc-android/res/layout/main.xml
+++ b/vlc-android/res/layout/main.xml
@@ -29,7 +29,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
- app:layout_behavior="org.videolan.vlc.gui.helpers.BottomSheetBehavior">
+ app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
<android.support.v7.widget.ViewStubCompat
android:id="@+id/audio_player_stub"
android:layout_width="match_parent"
diff --git a/vlc-android/res/layout/secondary.xml b/vlc-android/res/layout/secondary.xml
index f7a32f9..c451c41 100644
--- a/vlc-android/res/layout/secondary.xml
+++ b/vlc-android/res/layout/secondary.xml
@@ -22,7 +22,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
- vlc:layout_behavior="org.videolan.vlc.gui.helpers.BottomSheetBehavior">
+ vlc:layout_behavior="android.support.design.widget.BottomSheetBehavior">
<android.support.v7.widget.ViewStubCompat
android:id="@+id/audio_player_stub"
android:layout_width="match_parent"
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/BottomSheetBehavior.java b/vlc-android/src/org/videolan/vlc/gui/helpers/BottomSheetBehavior.java
deleted file mode 100644
index 618d80b..0000000
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/BottomSheetBehavior.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.videolan.vlc.gui.helpers;
-
-import android.content.Context;
-import android.support.design.widget.CoordinatorLayout;
-import android.util.AttributeSet;
-import android.view.MotionEvent;
-import android.view.View;
-
-
-public class BottomSheetBehavior<V extends View> extends android.support.design.widget.BottomSheetBehavior<V> {
- public static final String TAG = "VLC/BottomSheetBehavior";
-
- public BottomSheetBehavior() {}
-
- public BottomSheetBehavior(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- @Override
- public boolean onInterceptTouchEvent(CoordinatorLayout parent, V child, MotionEvent event) {
- try {
- return super.onInterceptTouchEvent(parent, child, event);
- } catch (NullPointerException ignored) {
- // BottomSheetBehavior receives input events too soon and mNestedScrollingChildRef is not set yet.
- return false;
- }
- }
-}
More information about the Android
mailing list