diff options
| author | David Brazdil <dbrazdil@google.com> | 2018-01-16 20:01:47 +0000 |
|---|---|---|
| committer | David Brazdil <dbrazdil@google.com> | 2018-01-16 22:36:41 +0000 |
| commit | 3d44ed0dfe33da3b9f08d102723d7fc842e18f74 (patch) | |
| tree | d412d053ded858a5cf3ac1050bb5462ad81d9a5b /core/java | |
| parent | f779d7e3bec6c80c833ce804757b5591e2c55230 (diff) | |
Pass targetSdkVersion to installd
Dex2oat now accepts targetSdkVersion as a parameter to determine
whether ART should treat the app as "legacy" and allow or restrict
access to private APIs.
We also bump arguments of otapreopt to v4 to accommodate the new value.
Bug: 64382372
Test: manual
Change-Id: Iae3867325dfaf8deaba51626ab04b97ad797d3b6
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/com/android/internal/os/ZygoteInit.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 2be6212b9f1e..212cdcbce0b1 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -572,10 +572,12 @@ public class ZygoteInit { final String seInfo = null; final String classLoaderContext = getSystemServerClassLoaderContext(classPathForElement); + final int targetSdkVersion = 0; // SystemServer targets the system's SDK version try { installd.dexopt(classPathElement, Process.SYSTEM_UID, packageName, instructionSet, dexoptNeeded, outputPath, dexFlags, compilerFilter, - uuid, classLoaderContext, seInfo, false /* downgrade */); + uuid, classLoaderContext, seInfo, false /* downgrade */, + targetSdkVersion); } catch (RemoteException | ServiceSpecificException e) { // Ignore (but log), we need this on the classpath for fallback mode. Log.w(TAG, "Failed compiling classpath element for system server: " |
