[Android] Catch IllegalArgumentException for title retrieval

Geoffrey Métais git at videolan.org
Thu Oct 12 11:12:59 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Oct 12 11:07:38 2017 +0200| [f0315b81da0c481255eb4d72f275b814d477219b] | committer: Geoffrey Métais

Catch IllegalArgumentException for title retrieval

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

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

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 51e9e9f5b..70e7a75e9 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -2083,7 +2083,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
                 if (!cursor.isNull(nameIndex))
                     mw.setTitle(cursor.getString(nameIndex));
             }
-        } catch (SecurityException e) { // We may not have storage access permission yet
+        } catch (SecurityException|IllegalArgumentException 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())



More information about the Android mailing list