[Android] Automatically open unique directory in Android-auto extension root

David Papazian git at videolan.org
Tue Aug 29 15:17:33 CEST 2017


vlc-android | branch: master | David Papazian <david.papazian at metz.supelec.fr> | Fri Aug 25 19:10:09 2017 +0200| [91b05eaf9f65862f8cb6bd6715e130a16ded7e6b] | committer: Geoffrey Métais

Automatically open unique directory in Android-auto extension root

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/91b05eaf9f65862f8cb6bd6715e130a16ded7e6b
---

 vlc-android/src/org/videolan/vlc/media/BrowserProvider.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/media/BrowserProvider.java b/vlc-android/src/org/videolan/vlc/media/BrowserProvider.java
index 53bb1243c..5e4c9cd8a 100644
--- a/vlc-android/src/org/videolan/vlc/media/BrowserProvider.java
+++ b/vlc-android/src/org/videolan/vlc/media/BrowserProvider.java
@@ -293,6 +293,10 @@ public class BrowserProvider implements ExtensionManagerService.ExtensionManager
 
     @Override
     public void displayExtensionItems(int extensionId, String title, List<VLCExtensionItem> items, boolean showParams, boolean isRefresh) {
+        if (showParams && items.size() == 1 && items.get(0).getType() == VLCExtensionItem.TYPE_DIRECTORY) {
+            sExtensionManagerService.browse(items.get(0).stringId);
+            return;
+        }
         MediaDescriptionCompat.Builder mediaItem;
         VLCExtensionItem extensionItem;
         for (int i=0; i<items.size(); i++) {



More information about the Android mailing list