(
@Nullable Context context, @Nullable SoFileLoader soFileLoader, int flags)
| 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) { |
no test coverage detected