MCPcopy Create free account
hub / github.com/facebook/SoLoader / initSoLoader

Method initSoLoader

java/com/facebook/soloader/SoLoader.java:585–613  ·  view source on GitHub ↗
(
      @Nullable Context context, @Nullable SoFileLoader soFileLoader, int flags)

Source from the content-addressed store, hash-verified

583 }
584
585 private static synchronized void initSoLoader(
586 @Nullable Context context, @Nullable SoFileLoader soFileLoader, int flags) {
587 if (context != null) {
588 Context applicationContext = context.getApplicationContext();
589
590 if (applicationContext == null) {
591 applicationContext = context;
592 LogUtil.w(
593 TAG,
594 "context.getApplicationContext returned null, holding reference to original context."
595 + "ApplicationSoSource fallbacks to: "
596 + context.getApplicationInfo().nativeLibraryDir);
597 }
598
599 sApplicationContext = applicationContext;
600 sRecoveryStrategyFactory =
601 new DefaultRecoveryStrategyFactory(applicationContext, makeRecoveryFlags(flags));
602 }
603
604 if (soFileLoader == null && sSoFileLoader != null) {
605 return;
606 }
607 if (soFileLoader != null) {
608 sSoFileLoader = soFileLoader;
609 return;
610 }
611
612 sSoFileLoader = new InstrumentedSoFileLoader(new SoFileLoaderImpl());
613 }
614
615 private static int getAppType(@Nullable Context context) {
616 if (sAppType != AppType.UNSET) {

Callers 1

initMethod · 0.95

Calls 2

wMethod · 0.95
makeRecoveryFlagsMethod · 0.95

Tested by

no test coverage detected