Loading services/java/com/android/server/pm/Installer.java +3 −1 Original line number Diff line number Diff line Loading @@ -240,11 +240,12 @@ public final class Installer { builder.append(" *"); // No pkgName arg present builder.append(' '); builder.append(instructionSet); builder.append(" 0"); // vmSafeMode=false return execute(builder.toString()); } public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName, String instructionSet) { String instructionSet, boolean vmSafeMode) { StringBuilder builder = new StringBuilder("dexopt"); builder.append(' '); builder.append(apkPath); Loading @@ -255,6 +256,7 @@ public final class Installer { builder.append(pkgName); builder.append(' '); builder.append(instructionSet); builder.append(vmSafeMode ? " 1" : " 0"); return execute(builder.toString()); } Loading services/java/com/android/server/pm/PackageManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -4293,6 +4293,7 @@ public class PackageManagerService extends IPackageManager.Stub { } } final boolean vmSafeMode = (pkg.applicationInfo.flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0; boolean performed = false; if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0) { String path = pkg.mScanPath; Loading @@ -4309,10 +4310,11 @@ public class PackageManagerService extends IPackageManager.Stub { // 2.) we are defering a needed dexopt // 3.) we are skipping an unneeded dexopt if (forceDex || (!defer && isDexOptNeededInternal == DexFile.DEXOPT_NEEDED)) { Log.i(TAG, "Running dexopt on: " + pkg.applicationInfo.packageName); Log.i(TAG, "Running dexopt on: " + pkg.applicationInfo.packageName + " vmSafeMode=" + vmSafeMode); final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid); int ret = mInstaller.dexopt(path, sharedGid, !isForwardLocked(pkg), pkg.packageName, dexCodeInstructionSet); pkg.packageName, dexCodeInstructionSet, vmSafeMode); // Note that we ran dexopt, since rerunning will // probably just result in an error again. pkg.mDexOptNeeded = false; Loading Loading
services/java/com/android/server/pm/Installer.java +3 −1 Original line number Diff line number Diff line Loading @@ -240,11 +240,12 @@ public final class Installer { builder.append(" *"); // No pkgName arg present builder.append(' '); builder.append(instructionSet); builder.append(" 0"); // vmSafeMode=false return execute(builder.toString()); } public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName, String instructionSet) { String instructionSet, boolean vmSafeMode) { StringBuilder builder = new StringBuilder("dexopt"); builder.append(' '); builder.append(apkPath); Loading @@ -255,6 +256,7 @@ public final class Installer { builder.append(pkgName); builder.append(' '); builder.append(instructionSet); builder.append(vmSafeMode ? " 1" : " 0"); return execute(builder.toString()); } Loading
services/java/com/android/server/pm/PackageManagerService.java +4 −2 Original line number Diff line number Diff line Loading @@ -4293,6 +4293,7 @@ public class PackageManagerService extends IPackageManager.Stub { } } final boolean vmSafeMode = (pkg.applicationInfo.flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0; boolean performed = false; if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0) { String path = pkg.mScanPath; Loading @@ -4309,10 +4310,11 @@ public class PackageManagerService extends IPackageManager.Stub { // 2.) we are defering a needed dexopt // 3.) we are skipping an unneeded dexopt if (forceDex || (!defer && isDexOptNeededInternal == DexFile.DEXOPT_NEEDED)) { Log.i(TAG, "Running dexopt on: " + pkg.applicationInfo.packageName); Log.i(TAG, "Running dexopt on: " + pkg.applicationInfo.packageName + " vmSafeMode=" + vmSafeMode); final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid); int ret = mInstaller.dexopt(path, sharedGid, !isForwardLocked(pkg), pkg.packageName, dexCodeInstructionSet); pkg.packageName, dexCodeInstructionSet, vmSafeMode); // Note that we ran dexopt, since rerunning will // probably just result in an error again. pkg.mDexOptNeeded = false; Loading