Loading core/java/android/content/pm/ApplicationInfo.java +22 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.server.SystemConfig; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.text.Collator; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; Loading Loading @@ -2028,6 +2029,27 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return this; } /** * Return all the APK paths that may be required to load this application, including all * splits, shared libraries, and resource overlays. * @hide */ public String[] getAllApkPaths() { final String[][] inputLists = { splitSourceDirs, sharedLibraryFiles, resourceDirs }; final List<String> output = new ArrayList<>(10); if (sourceDir != null) { output.add(sourceDir); } for (String[] inputList : inputLists) { if (inputList != null) { for (String input : inputList) { output.add(input); } } } return output.toArray(new String[output.size()]); } /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; } /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; } /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; } Loading core/java/com/android/internal/os/Zygote.java +2 −11 Original line number Diff line number Diff line Loading @@ -369,19 +369,10 @@ public final class Zygote { * @param appInfo ApplicationInfo of the application */ protected static void allowAppFilesAcrossFork(ApplicationInfo appInfo) { Zygote.nativeAllowFileAcrossFork(appInfo.sourceDir); if (appInfo.splitSourceDirs != null) { for (String path : appInfo.splitSourceDirs) { for (String path : appInfo.getAllApkPaths()) { Zygote.nativeAllowFileAcrossFork(path); } } // As well as its shared libs if (appInfo.sharedLibraryFiles != null) { for (String path : appInfo.sharedLibraryFiles) { Zygote.nativeAllowFileAcrossFork(path); } } } /** * Installs a seccomp filter that limits setresuid()/setresgid() to the passed-in range Loading Loading
core/java/android/content/pm/ApplicationInfo.java +22 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import com.android.server.SystemConfig; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.text.Collator; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; Loading Loading @@ -2028,6 +2029,27 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return this; } /** * Return all the APK paths that may be required to load this application, including all * splits, shared libraries, and resource overlays. * @hide */ public String[] getAllApkPaths() { final String[][] inputLists = { splitSourceDirs, sharedLibraryFiles, resourceDirs }; final List<String> output = new ArrayList<>(10); if (sourceDir != null) { output.add(sourceDir); } for (String[] inputList : inputLists) { if (inputList != null) { for (String input : inputList) { output.add(input); } } } return output.toArray(new String[output.size()]); } /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; } /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; } /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; } Loading
core/java/com/android/internal/os/Zygote.java +2 −11 Original line number Diff line number Diff line Loading @@ -369,19 +369,10 @@ public final class Zygote { * @param appInfo ApplicationInfo of the application */ protected static void allowAppFilesAcrossFork(ApplicationInfo appInfo) { Zygote.nativeAllowFileAcrossFork(appInfo.sourceDir); if (appInfo.splitSourceDirs != null) { for (String path : appInfo.splitSourceDirs) { for (String path : appInfo.getAllApkPaths()) { Zygote.nativeAllowFileAcrossFork(path); } } // As well as its shared libs if (appInfo.sharedLibraryFiles != null) { for (String path : appInfo.sharedLibraryFiles) { Zygote.nativeAllowFileAcrossFork(path); } } } /** * Installs a seccomp filter that limits setresuid()/setresgid() to the passed-in range Loading