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

Commit 1f3fa889 authored by Chris Gross's avatar Chris Gross Committed by Automerger Merge Worker
Browse files

Merge "Allow bootjars in system_ext." am: 6abe4fb0 am: 4ab8f542 am: ec82e99c

Change-Id: I2ce12c45dda82a0a49602d327e8f8403420306e1
parents 5ffd21e4 ec82e99c
Loading
Loading
Loading
Loading
+11 −4
Original line number Original line Diff line number Diff line
@@ -85,12 +85,19 @@ bool FileDescriptorWhitelist::IsAllowed(const std::string& path) const {
  }
  }


  // Framework jars are allowed.
  // Framework jars are allowed.
  static const char* kFrameworksPrefix = "/system/framework/";
  static const char* kFrameworksPrefix[] = {
          "/system/framework/",
          "/system_ext/framework/",
  };

  static const char* kJarSuffix = ".jar";
  static const char* kJarSuffix = ".jar";
  if (android::base::StartsWith(path, kFrameworksPrefix)

  for (const auto& frameworks_prefix : kFrameworksPrefix) {
    if (android::base::StartsWith(path, frameworks_prefix)
        && android::base::EndsWith(path, kJarSuffix)) {
        && android::base::EndsWith(path, kJarSuffix)) {
      return true;
      return true;
    }
    }
  }


  // Jars from the ART APEX are allowed.
  // Jars from the ART APEX are allowed.
  static const char* kArtApexPrefix = "/apex/com.android.art/javalib/";
  static const char* kArtApexPrefix = "/apex/com.android.art/javalib/";