Clean up passing volumeUuid to DexOptimizer
The argument was redundant. Also, we should have taken the uuid for shared library from their package information. Bug: 26080105 Change-Id: If3d86e00ebecfc13cf63482bce4ac32a119de967
This commit is contained in:
@@ -82,7 +82,7 @@ final class PackageDexOptimizer {
|
||||
* {@link PackageManagerService#mInstallLock}.
|
||||
*/
|
||||
int performDexOpt(PackageParser.Package pkg, String[] instructionSets,
|
||||
boolean inclDependencies, String volumeUuid, boolean useProfiles, boolean extractOnly) {
|
||||
boolean inclDependencies, boolean useProfiles, boolean extractOnly) {
|
||||
ArraySet<String> done;
|
||||
if (inclDependencies && (pkg.usesLibraries != null || pkg.usesOptionalLibraries != null)) {
|
||||
done = new ArraySet<String>();
|
||||
@@ -97,7 +97,7 @@ final class PackageDexOptimizer {
|
||||
mDexoptWakeLock.acquire();
|
||||
}
|
||||
try {
|
||||
return performDexOptLI(pkg, instructionSets, done, volumeUuid, useProfiles,
|
||||
return performDexOptLI(pkg, instructionSets, done, useProfiles,
|
||||
extractOnly);
|
||||
} finally {
|
||||
if (useLock) {
|
||||
@@ -108,7 +108,7 @@ final class PackageDexOptimizer {
|
||||
}
|
||||
|
||||
private int performDexOptLI(PackageParser.Package pkg, String[] targetInstructionSets,
|
||||
ArraySet<String> done, String volumeUuid, boolean useProfiles, boolean extractOnly) {
|
||||
ArraySet<String> done, boolean useProfiles, boolean extractOnly) {
|
||||
final String[] instructionSets = targetInstructionSets != null ?
|
||||
targetInstructionSets : getAppDexInstructionSets(pkg.applicationInfo);
|
||||
|
||||
@@ -185,7 +185,7 @@ final class PackageDexOptimizer {
|
||||
try {
|
||||
mPackageManagerService.mInstaller.dexopt(path, sharedGid,
|
||||
pkg.packageName, dexCodeInstructionSet, dexoptNeeded, oatDir,
|
||||
dexFlags, volumeUuid, useProfiles);
|
||||
dexFlags, pkg.volumeUuid, useProfiles);
|
||||
performedDexOpt = true;
|
||||
} catch (InstallerException e) {
|
||||
Slog.w(TAG, "Failed to dexopt", e);
|
||||
@@ -252,8 +252,7 @@ final class PackageDexOptimizer {
|
||||
if (libPkg != null && !done.contains(libName)) {
|
||||
// TODO: Analyze and investigate if we (should) profile libraries.
|
||||
// Currently this will do a full compilation of the library.
|
||||
performDexOptLI(libPkg, instructionSets, done,
|
||||
StorageManager.UUID_PRIVATE_INTERNAL, /*useProfiles*/ false,
|
||||
performDexOptLI(libPkg, instructionSets, done, /*useProfiles*/ false,
|
||||
/* extractOnly */ false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6717,7 +6717,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
synchronized (mInstallLock) {
|
||||
final String[] instructionSets = new String[] { targetInstructionSet };
|
||||
int result = mPackageDexOptimizer.performDexOpt(p, instructionSets,
|
||||
true /* inclDependencies */, p.volumeUuid, useProfiles, extractOnly);
|
||||
true /* inclDependencies */, useProfiles, extractOnly);
|
||||
return result == PackageDexOptimizer.DEX_OPT_PERFORMED;
|
||||
}
|
||||
} finally {
|
||||
@@ -6762,7 +6762,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
// Whoever is calling forceDexOpt wants a fully compiled package.
|
||||
// Don't use profiles since that may cause compilation to be skipped.
|
||||
final int res = mPackageDexOptimizer.performDexOpt(pkg, instructionSets,
|
||||
true /* inclDependencies */, pkg.volumeUuid, false /* useProfiles */,
|
||||
true /* inclDependencies */, false /* useProfiles */,
|
||||
false /* extractOnly */);
|
||||
|
||||
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
|
||||
@@ -13024,7 +13024,7 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
// Do not run PackageDexOptimizer through the local performDexOpt
|
||||
// method because `pkg` is not in `mPackages` yet.
|
||||
int result = mPackageDexOptimizer.performDexOpt(pkg, null /* instructionSets */,
|
||||
false /* inclDependencies */, volumeUuid, false /* useProfiles */,
|
||||
false /* inclDependencies */, false /* useProfiles */,
|
||||
true /* extractOnly */);
|
||||
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
|
||||
if (result == PackageDexOptimizer.DEX_OPT_FAILED) {
|
||||
|
||||
Reference in New Issue
Block a user