[Android] Media title: Catch UnsupportedOperationException

Geoffrey Métais git at videolan.org
Fri May 18 16:39:30 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 18 15:15:08 2018 +0200| [078a918f3321d60683ef7049599965b3913ddeca] | committer: Geoffrey Métais

Media title: Catch UnsupportedOperationException

> https://code.videolan.org/videolan/vlc-android/commit/078a918f3321d60683ef7049599965b3913ddeca
---

 vlc-android/src/org/videolan/vlc/media/MediaUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/MediaUtils.java b/vlc-android/src/org/videolan/vlc/media/MediaUtils.java
index 88ac1d6f0..eda88c666 100644
--- a/vlc-android/src/org/videolan/vlc/media/MediaUtils.java
+++ b/vlc-android/src/org/videolan/vlc/media/MediaUtils.java
@@ -330,7 +330,7 @@ public class MediaUtils {
                 cursor.moveToFirst();
                 if (!cursor.isNull(nameIndex)) mw.setTitle(cursor.getString(nameIndex));
             }
-        } catch (SecurityException|IllegalArgumentException e) { // We may not have storage access permission yet
+        } catch (SecurityException|IllegalArgumentException|UnsupportedOperationException e) { // We may not have storage access permission yet
             Log.w(TAG, "retrieveMediaTitle: fail to resolve file from "+mw.getUri(), e);
         } finally {
             if (cursor != null && !cursor.isClosed()) cursor.close();



More information about the Android mailing list