diff --git a/java/com/facebook/soloader/SoLoader.java b/java/com/facebook/soloader/SoLoader.java index 949c59c..9707915 100644 --- a/java/com/facebook/soloader/SoLoader.java +++ b/java/com/facebook/soloader/SoLoader.java @@ -778,10 +778,10 @@ public static boolean loadLibrary(String shortName, int loadFlags) throws Unsati @SuppressLint({"CatchGeneralException", "EmptyCatchBlock"}) private static boolean loadLibraryOnAndroid(String shortName, int loadFlags) { @Nullable Throwable failure = null; - ObserverHolder.onLoadLibraryStart(shortName, loadFlags); try { String mergedLibName = MergedSoMapping.mapLibName(shortName); String soName = mergedLibName != null ? mergedLibName : shortName; + ObserverHolder.onLoadLibraryStart(shortName, mergedLibName, loadFlags); return loadLibraryBySoName( System.mapLibraryName(soName), shortName, mergedLibName, loadFlags, null); } catch (Throwable t) { diff --git a/java/com/facebook/soloader/observer/Observer.java b/java/com/facebook/soloader/observer/Observer.java index 0579664..da9e75e 100644 --- a/java/com/facebook/soloader/observer/Observer.java +++ b/java/com/facebook/soloader/observer/Observer.java @@ -22,7 +22,7 @@ import javax.annotation.Nullable; public interface Observer { - void onLoadLibraryStart(String library, int flags); + void onLoadLibraryStart(String library, @Nullable String mergedLibrary, int flags); void onLoadLibraryEnd(@Nullable Throwable t); diff --git a/java/com/facebook/soloader/observer/ObserverHolder.java b/java/com/facebook/soloader/observer/ObserverHolder.java index 02bf113..a8390bb 100644 --- a/java/com/facebook/soloader/observer/ObserverHolder.java +++ b/java/com/facebook/soloader/observer/ObserverHolder.java @@ -45,11 +45,11 @@ public static void addObserver(Observer newObserver) { } while (!sObservers.compareAndSet(oldObservers, newObservers)); } - public static void onLoadLibraryStart(String library, int flags) { + public static void onLoadLibraryStart(String library, @Nullable String mergedLibrary, int flags) { Observer[] observers = sObservers.get(); if (observers != null) { for (Observer observer : observers) { - observer.onLoadLibraryStart(library, flags); + observer.onLoadLibraryStart(library, mergedLibrary, flags); } } }