[Android] Initialize folder constants at launch

Edward Wang git at videolan.org
Wed Aug 28 20:43:43 CEST 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Wed Aug 28 20:43:11 2013 +0200| [f35525b9ac0960a19b792ecd2ef5f6f892871332] | committer: Edward Wang

Initialize folder constants at launch

We should be able to access the playlist directory path without AudioService.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f35525b9ac0960a19b792ecd2ef5f6f892871332
---

 vlc-android/src/org/videolan/vlc/AudioService.java   |    2 --
 vlc-android/src/org/videolan/vlc/VLCApplication.java |    6 +++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/AudioService.java b/vlc-android/src/org/videolan/vlc/AudioService.java
index 415d84b..d582755 100644
--- a/vlc-android/src/org/videolan/vlc/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/AudioService.java
@@ -182,8 +182,6 @@ public class AudioService extends Service {
             mRemoteControlClientReceiver = new RemoteControlClientReceiver();
             registerReceiver(mRemoteControlClientReceiver, filter);
         }
-
-        AudioUtil.prepareCacheFolder(this);
     }
 
 
diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index f713f84..00e7ad9 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * VLCApplication.java
  *****************************************************************************
- * Copyright © 2010-2012 VLC authors and VideoLAN
+ * Copyright © 2010-2013 VLC authors and VideoLAN
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@ package org.videolan.vlc;
 
 import java.util.Locale;
 
+import org.videolan.vlc.gui.audio.AudioUtil;
+
 import android.app.Application;
 import android.content.Context;
 import android.content.SharedPreferences;
@@ -74,6 +76,8 @@ public class VLCApplication extends Application {
 
         // Initialize the database soon enough to avoid any race condition and crash
         MediaDatabase.getInstance(this);
+        // Prepare cache folder constants
+        AudioUtil.prepareCacheFolder(this);
     }
 
     /**



More information about the Android mailing list