Merge "Don't include the data dir in zygote library paths." into rvc-dev
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index d650801..10f7835 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -801,6 +801,11 @@
makePaths(mActivityThread, isBundledApp, mApplicationInfo, zipPaths, libPaths);
String libraryPermittedPath = mDataDir;
+ if (mActivityThread == null) {
+ // In a zygote context where mActivityThread is null we can't access the app data dir
+ // and including this in libraryPermittedPath would cause SELinux denials.
+ libraryPermittedPath = "";
+ }
if (isBundledApp) {
// For bundled apps, add the base directory of the app (e.g.,