[Android] Cache preparation fallback if init failure

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


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Oct 12 10:31:54 2017 +0200| [ae468df3192028c27a8e6e792b46b6d5246749ab] | committer: Geoffrey Métais

Cache preparation fallback if init failure

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java b/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
index 80a013449..200cfd5e7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/AudioUtil.java
@@ -138,7 +138,7 @@ public class AudioUtil {
                 CACHE_DIR = context.getExternalCacheDir().getPath();
             else
                 CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APPLICATION_ID + "/cache";
-        } catch (Exception e) { // catch NPE thrown by getExternalCacheDir()
+        } catch (Exception|ExceptionInInitializerError e) { // catch NPE thrown by getExternalCacheDir()
             CACHE_DIR = AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY + "/Android/data/" + BuildConfig.APPLICATION_ID + "/cache";
         }
         ART_DIR.set(CACHE_DIR + "/art/");



More information about the Android mailing list