Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b36a5bc6 authored by Martin Stjernholm's avatar Martin Stjernholm Committed by Android (Google) Code Review
Browse files

Merge "Update path to the new ART APEX."

parents 55a6847a 3de5cbbd
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -883,7 +883,7 @@ public final class LoadedApk {
            }
            }
        }
        }


        // /aepx/com.android.runtime/lib, /vendor/lib, /odm/lib and /product/lib
        // /apex/com.android.art/lib, /vendor/lib, /odm/lib and /product/lib
        // are added to the native lib search paths of the classloader.
        // are added to the native lib search paths of the classloader.
        // Note that this is done AFTER the classloader is
        // Note that this is done AFTER the classloader is
        // created by ApplicationLoaders.getDefault().getClassLoader(...). The
        // created by ApplicationLoaders.getDefault().getClassLoader(...). The
@@ -904,8 +904,8 @@ public final class LoadedApk {
        // (linker namespace).
        // (linker namespace).
        List<String> extraLibPaths = new ArrayList<>(4);
        List<String> extraLibPaths = new ArrayList<>(4);
        String abiSuffix = VMRuntime.getRuntime().is64Bit() ? "64" : "";
        String abiSuffix = VMRuntime.getRuntime().is64Bit() ? "64" : "";
        if (!defaultSearchPaths.contains("/apex/com.android.runtime/lib")) {
        if (!defaultSearchPaths.contains("/apex/com.android.art/lib")) {
            extraLibPaths.add("/apex/com.android.runtime/lib" + abiSuffix);
            extraLibPaths.add("/apex/com.android.art/lib" + abiSuffix);
        }
        }
        if (!defaultSearchPaths.contains("/vendor/lib")) {
        if (!defaultSearchPaths.contains("/vendor/lib")) {
            extraLibPaths.add("/vendor/lib" + abiSuffix);
            extraLibPaths.add("/vendor/lib" + abiSuffix);
+3 −3
Original line number Original line Diff line number Diff line
@@ -80,9 +80,9 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
    return true;
    return true;
  }
  }


  // Jars from the runtime apex are allowed.
  // Jars from the ART APEX are allowed.
  static const char* kRuntimeApexPrefix = "/apex/com.android.runtime/javalib/";
  static const char* kArtApexPrefix = "/apex/com.android.art/javalib/";
  if (android::base::StartsWith(path, kRuntimeApexPrefix)
  if (android::base::StartsWith(path, kArtApexPrefix)
      && android::base::EndsWith(path, kJarSuffix)) {
      && android::base::EndsWith(path, kJarSuffix)) {
    return true;
    return true;
  }
  }