diff --git a/java/com/facebook/soloader/SoLoader.java b/java/com/facebook/soloader/SoLoader.java index 99831e4..bdcb941 100644 --- a/java/com/facebook/soloader/SoLoader.java +++ b/java/com/facebook/soloader/SoLoader.java @@ -91,7 +91,7 @@ public class SoLoader { @Nullable private static SoSource[] sSoSources = null; - private static int sSoSourcesVersion = 0; + private static volatile int sSoSourcesVersion = 0; /** A backup SoSources to try if a lib file is corrupted */ @GuardedBy("sSoSourcesLock") @@ -866,6 +866,10 @@ private static void assertInitialized() { } } + public static int getSoSourcesVersion() { + return sSoSourcesVersion; + } + /** * Add a new source of native libraries. SoLoader consults the new source before any * currently-installed source.