[Android] Set Medialibrary init check volatile

Geoffrey Métais git at videolan.org
Tue Mar 14 18:34:01 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 14 15:28:53 2017 +0100| [cf9ac030e7a77c2c0de504445c42aa25c9745227] | committer: Geoffrey Métais

Set Medialibrary init check volatile

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

 medialibrary/src/org/videolan/medialibrary/Medialibrary.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
index 47496cf..b49c39d 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -45,7 +45,7 @@ public class Medialibrary {
     private static final MediaWrapper[] EMPTY_COLLECTION = {};
 
     private long mInstanceID;
-    private boolean mIsInitiated = false;
+    private volatile boolean mIsInitiated = false;
 
     private MediaUpdatedCb mediaUpdatedCb = null;
     private MediaAddedCb mediaAddedCb = null;



More information about the Android mailing list