Merge "Add isBundled argument to LoadedApk.makePaths call"
This commit is contained in:
@@ -266,7 +266,7 @@ public final class LoadedApk {
|
|||||||
setApplicationInfo(aInfo);
|
setApplicationInfo(aInfo);
|
||||||
|
|
||||||
final List<String> newPaths = new ArrayList<>();
|
final List<String> newPaths = new ArrayList<>();
|
||||||
makePaths(mActivityThread, aInfo, newPaths, null /*libPaths*/);
|
makePaths(mActivityThread, aInfo, newPaths);
|
||||||
final List<String> addedPaths = new ArrayList<>(newPaths.size());
|
final List<String> addedPaths = new ArrayList<>(newPaths.size());
|
||||||
|
|
||||||
if (oldPaths != null) {
|
if (oldPaths != null) {
|
||||||
@@ -314,8 +314,17 @@ public final class LoadedApk {
|
|||||||
mCredentialProtectedDataDirFile = FileUtils.newFileOrNull(aInfo.credentialProtectedDataDir);
|
mCredentialProtectedDataDirFile = FileUtils.newFileOrNull(aInfo.credentialProtectedDataDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void makePaths(ActivityThread activityThread, ApplicationInfo aInfo,
|
public static void makePaths(ActivityThread activityThread,
|
||||||
List<String> outZipPaths, List<String> outLibPaths) {
|
ApplicationInfo aInfo,
|
||||||
|
List<String> outZipPaths) {
|
||||||
|
makePaths(activityThread, false, aInfo, outZipPaths, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void makePaths(ActivityThread activityThread,
|
||||||
|
boolean isBundledApp,
|
||||||
|
ApplicationInfo aInfo,
|
||||||
|
List<String> outZipPaths,
|
||||||
|
List<String> outLibPaths) {
|
||||||
final String appDir = aInfo.sourceDir;
|
final String appDir = aInfo.sourceDir;
|
||||||
final String[] splitAppDirs = aInfo.splitSourceDirs;
|
final String[] splitAppDirs = aInfo.splitSourceDirs;
|
||||||
final String libDir = aInfo.nativeLibraryDir;
|
final String libDir = aInfo.nativeLibraryDir;
|
||||||
@@ -398,7 +407,7 @@ public final class LoadedApk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aInfo.isSystemApp() && !aInfo.isUpdatedSystemApp()) {
|
if (isBundledApp) {
|
||||||
// Add path to system libraries to libPaths;
|
// Add path to system libraries to libPaths;
|
||||||
// Access to system libs should be limited
|
// Access to system libs should be limited
|
||||||
// to bundled applications; this is why updated
|
// to bundled applications; this is why updated
|
||||||
@@ -471,11 +480,12 @@ public final class LoadedApk {
|
|||||||
// space and initialize to a small value (instead of incurring growth code).
|
// space and initialize to a small value (instead of incurring growth code).
|
||||||
final List<String> zipPaths = new ArrayList<>(10);
|
final List<String> zipPaths = new ArrayList<>(10);
|
||||||
final List<String> libPaths = new ArrayList<>(10);
|
final List<String> libPaths = new ArrayList<>(10);
|
||||||
makePaths(mActivityThread, mApplicationInfo, zipPaths, libPaths);
|
|
||||||
|
|
||||||
final boolean isBundledApp = mApplicationInfo.isSystemApp()
|
final boolean isBundledApp = mApplicationInfo.isSystemApp()
|
||||||
&& !mApplicationInfo.isUpdatedSystemApp();
|
&& !mApplicationInfo.isUpdatedSystemApp();
|
||||||
|
|
||||||
|
makePaths(mActivityThread, isBundledApp, mApplicationInfo, zipPaths, libPaths);
|
||||||
|
|
||||||
String libraryPermittedPath = mDataDir;
|
String libraryPermittedPath = mDataDir;
|
||||||
if (isBundledApp) {
|
if (isBundledApp) {
|
||||||
// This is necessary to grant bundled apps access to
|
// This is necessary to grant bundled apps access to
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public class WebViewZygote {
|
|||||||
// paths and pass them to the zygote as strings.
|
// paths and pass them to the zygote as strings.
|
||||||
final List<String> zipPaths = new ArrayList<>(10);
|
final List<String> zipPaths = new ArrayList<>(10);
|
||||||
final List<String> libPaths = new ArrayList<>(10);
|
final List<String> libPaths = new ArrayList<>(10);
|
||||||
LoadedApk.makePaths(null, sPackage.applicationInfo, zipPaths, libPaths);
|
LoadedApk.makePaths(null, false, sPackage.applicationInfo, zipPaths, libPaths);
|
||||||
final String librarySearchPath = TextUtils.join(File.pathSeparator, libPaths);
|
final String librarySearchPath = TextUtils.join(File.pathSeparator, libPaths);
|
||||||
final String zip = (zipPaths.size() == 1) ? zipPaths.get(0) :
|
final String zip = (zipPaths.size() == 1) ? zipPaths.get(0) :
|
||||||
TextUtils.join(File.pathSeparator, zipPaths);
|
TextUtils.join(File.pathSeparator, zipPaths);
|
||||||
|
|||||||
Reference in New Issue
Block a user