[Android] Do not set OnDragListener on Android 2
Geoffrey Métais
git at videolan.org
Thu Dec 21 15:16:16 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec 21 15:15:45 2017 +0100| [6e86853714708824d48ada1d678325d2ee3498a9] | committer: Geoffrey Métais
Do not set OnDragListener on Android 2
> https://code.videolan.org/videolan/vlc-android/commit/6e86853714708824d48ada1d678325d2ee3498a9
---
vlc-android/src/org/videolan/vlc/gui/ContentActivity.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java b/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
index a73eb8b2a..c0cf21498 100644
--- a/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/ContentActivity.java
@@ -38,6 +38,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.vlc.R;
import org.videolan.vlc.gui.audio.EqualizerFragment;
import org.videolan.vlc.gui.browser.ExtensionBrowser;
@@ -53,7 +54,7 @@ public class ContentActivity extends AudioPlayerContainerActivity implements Sea
@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
- final View view = getWindow().peekDecorView();
+ final View view = AndroidUtil.isHoneycombOrLater ? getWindow().peekDecorView() : null;
if (view != null) view.setOnDragListener(new View.OnDragListener() {
@Override
public boolean onDrag(View v, DragEvent event) {
More information about the Android
mailing list