[Android] Disable long-press on ML storage on phone/tablet
Geoffrey Métais
git at videolan.org
Wed Mar 7 15:22:40 CET 2018
vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 2 12:08:43 2018 +0100| [1b0f1a5a8b210cf11dcc856ed1585350915b19f1] | committer: Geoffrey Métais
Disable long-press on ML storage on phone/tablet
(cherry picked from commit ab79e1b1efdec8478bd75832074f9583049ba4c3)
> https://code.videolan.org/videolan/vlc-android/commit/1b0f1a5a8b210cf11dcc856ed1585350915b19f1
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 2 +-
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index ecef90c26..cc0979cb1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -199,7 +199,7 @@ public class BaseBrowserAdapter extends SortableAdapter<MediaLibraryItem, BaseBr
public boolean onLongClick(View v) {
int position = getLayoutPosition();
- if (getItem(position).getItemType() == TYPE_STORAGE) {
+ if (getItem(position).getItemType() == TYPE_STORAGE && VLCApplication.showTvUi()) {
binding.browserCheckbox.toggle();
onCheckBoxClick(binding.browserCheckbox);
return true;
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 3e75e0b5f..354b69a88 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -872,7 +872,7 @@ public abstract class BaseBrowserFragment extends SortableFragment<BaseBrowserAd
}
public boolean onLongClick(View v, int position, MediaLibraryItem item) {
- if (mActionMode != null) return false;
+ if (mActionMode != null || item.getItemType() != MediaLibraryItem.TYPE_MEDIA) return false;
final MediaWrapper mediaWrapper = (MediaWrapper) item;
if (mediaWrapper.getType() == MediaWrapper.TYPE_AUDIO ||
mediaWrapper.getType() == MediaWrapper.TYPE_VIDEO ||
More information about the Android
mailing list