Loading core/java/com/android/internal/os/ZygoteInit.java +3 −1 Original line number Diff line number Diff line Loading @@ -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: " Loading services/core/java/com/android/server/pm/Installer.java +3 −2 Original line number Diff line number Diff line Loading @@ -281,13 +281,14 @@ public class Installer extends SystemService { public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade) @Nullable String seInfo, boolean downgrade, int targetSdkVersion) throws InstallerException { assertValidInstructionSet(instructionSet); if (!checkBeforeRemote()) return; try { mInstalld.dexopt(apkPath, uid, pkgName, instructionSet, dexoptNeeded, outputPath, dexFlags, compilerFilter, volumeUuid, sharedLibraries, seInfo, downgrade); dexFlags, compilerFilter, volumeUuid, sharedLibraries, seInfo, downgrade, targetSdkVersion); } catch (Exception e) { throw InstallerException.from(e); } Loading services/core/java/com/android/server/pm/OtaDexoptService.java +5 −3 Original line number Diff line number Diff line Loading @@ -260,12 +260,13 @@ public class OtaDexoptService extends IOtaDexopt.Stub { public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade) @Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade, int targetSdkVersion) throws InstallerException { final StringBuilder builder = new StringBuilder(); // The version. Right now it's 3. builder.append("3 "); // The version. Right now it's 4. builder.append("4 "); builder.append("dexopt"); Loading @@ -281,6 +282,7 @@ public class OtaDexoptService extends IOtaDexopt.Stub { encodeParameter(builder, sharedLibraries); encodeParameter(builder, seInfo); encodeParameter(builder, downgrade); encodeParameter(builder, targetSdkVersion); commands.add(builder.toString()); } Loading services/core/java/com/android/server/pm/PackageDexOptimizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ public class PackageDexOptimizer { // primary dex files. mInstaller.dexopt(path, uid, pkg.packageName, isa, dexoptNeeded, oatDir, dexoptFlags, compilerFilter, pkg.volumeUuid, classLoaderContext, pkg.applicationInfo.seInfo, false /* downgrade*/); false /* downgrade*/, pkg.applicationInfo.targetSdkVersion); if (packageStats != null) { long endTime = System.currentTimeMillis(); Loading Loading @@ -395,7 +395,7 @@ public class PackageDexOptimizer { mInstaller.dexopt(path, info.uid, info.packageName, isa, /*dexoptNeeded*/ 0, /*oatDir*/ null, dexoptFlags, compilerFilter, info.volumeUuid, classLoaderContext, info.seInfoUser, options.isDowngrade()); options.isDowngrade(), info.targetSdkVersion); } return DEX_OPT_PERFORMED; Loading Loading
core/java/com/android/internal/os/ZygoteInit.java +3 −1 Original line number Diff line number Diff line Loading @@ -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: " Loading
services/core/java/com/android/server/pm/Installer.java +3 −2 Original line number Diff line number Diff line Loading @@ -281,13 +281,14 @@ public class Installer extends SystemService { public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade) @Nullable String seInfo, boolean downgrade, int targetSdkVersion) throws InstallerException { assertValidInstructionSet(instructionSet); if (!checkBeforeRemote()) return; try { mInstalld.dexopt(apkPath, uid, pkgName, instructionSet, dexoptNeeded, outputPath, dexFlags, compilerFilter, volumeUuid, sharedLibraries, seInfo, downgrade); dexFlags, compilerFilter, volumeUuid, sharedLibraries, seInfo, downgrade, targetSdkVersion); } catch (Exception e) { throw InstallerException.from(e); } Loading
services/core/java/com/android/server/pm/OtaDexoptService.java +5 −3 Original line number Diff line number Diff line Loading @@ -260,12 +260,13 @@ public class OtaDexoptService extends IOtaDexopt.Stub { public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade) @Nullable String sharedLibraries, @Nullable String seInfo, boolean downgrade, int targetSdkVersion) throws InstallerException { final StringBuilder builder = new StringBuilder(); // The version. Right now it's 3. builder.append("3 "); // The version. Right now it's 4. builder.append("4 "); builder.append("dexopt"); Loading @@ -281,6 +282,7 @@ public class OtaDexoptService extends IOtaDexopt.Stub { encodeParameter(builder, sharedLibraries); encodeParameter(builder, seInfo); encodeParameter(builder, downgrade); encodeParameter(builder, targetSdkVersion); commands.add(builder.toString()); } Loading
services/core/java/com/android/server/pm/PackageDexOptimizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ public class PackageDexOptimizer { // primary dex files. mInstaller.dexopt(path, uid, pkg.packageName, isa, dexoptNeeded, oatDir, dexoptFlags, compilerFilter, pkg.volumeUuid, classLoaderContext, pkg.applicationInfo.seInfo, false /* downgrade*/); false /* downgrade*/, pkg.applicationInfo.targetSdkVersion); if (packageStats != null) { long endTime = System.currentTimeMillis(); Loading Loading @@ -395,7 +395,7 @@ public class PackageDexOptimizer { mInstaller.dexopt(path, info.uid, info.packageName, isa, /*dexoptNeeded*/ 0, /*oatDir*/ null, dexoptFlags, compilerFilter, info.volumeUuid, classLoaderContext, info.seInfoUser, options.isDowngrade()); options.isDowngrade(), info.targetSdkVersion); } return DEX_OPT_PERFORMED; Loading