code: public boolean checkAndMaybeUpdate() throws IOException {
      try {
        File nativeLibDir = soSource.soDirectory;
        Context updatedContext =
            applicationContext.createPackageContext(applicationContext.getPackageName(), 0);
        File updatedNativeLibDir = new File(updatedContext.getApplicationInfo().nativeLibraryDir);
        if (!nativeLibDir.equals(updatedNativeLibDir)) {
          Log.d(
              SoLoader.TAG,
              "Native library directory updated from " + nativeLibDir + " to " + updatedNativeLibDir);
          // update flags to resolve dependencies since the system does not properly resolve
          // dependencies when the location has moved
          flags |= DirectorySoSource.RESOLVE_DEPENDENCIES;
          soSource = new DirectorySoSource(updatedNativeLibDir, flags);
          soSource.prepare(flags);
          applicationContext = updatedContext;
          return true;
        }
        return false;
      } catch (PackageManager.NameNotFoundException e) {
        throw new RuntimeException(e);
      }
    }
docs: check to make sure there haven't been any changes to the nativeLibraryDir since the last check,
  if there have been changes, update the context and soSource
  
  @return true if the nativeLibraryDir was updated