Merge "Remove mInstallLock from dexopt." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f5393cec0d
@@ -358,9 +358,7 @@ final class DexOptHelper {
|
|||||||
}
|
}
|
||||||
final long callingId = Binder.clearCallingIdentity();
|
final long callingId = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
synchronized (mPm.mInstallLock) {
|
return performDexOptInternalWithDependenciesLI(p, pkgSetting, options);
|
||||||
return performDexOptInternalWithDependenciesLI(p, pkgSetting, options);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(callingId);
|
Binder.restoreCallingIdentity(callingId);
|
||||||
}
|
}
|
||||||
@@ -429,20 +427,18 @@ final class DexOptHelper {
|
|||||||
throw new IllegalArgumentException("Unknown package: " + packageName);
|
throw new IllegalArgumentException("Unknown package: " + packageName);
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized (mPm.mInstallLock) {
|
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
|
||||||
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
|
|
||||||
|
|
||||||
// Whoever is calling forceDexOpt wants a compiled package.
|
// Whoever is calling forceDexOpt wants a compiled package.
|
||||||
// Don't use profiles since that may cause compilation to be skipped.
|
// Don't use profiles since that may cause compilation to be skipped.
|
||||||
final int res = performDexOptInternalWithDependenciesLI(pkg, packageState,
|
final int res = performDexOptInternalWithDependenciesLI(pkg, packageState,
|
||||||
new DexoptOptions(packageName,
|
new DexoptOptions(packageName,
|
||||||
getDefaultCompilerFilter(),
|
getDefaultCompilerFilter(),
|
||||||
DexoptOptions.DEXOPT_FORCE | DexoptOptions.DEXOPT_BOOT_COMPLETE));
|
DexoptOptions.DEXOPT_FORCE | DexoptOptions.DEXOPT_BOOT_COMPLETE));
|
||||||
|
|
||||||
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
|
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
|
||||||
if (res != PackageDexOptimizer.DEX_OPT_PERFORMED) {
|
if (res != PackageDexOptimizer.DEX_OPT_PERFORMED) {
|
||||||
throw new IllegalStateException("Failed to dexopt: " + res);
|
throw new IllegalStateException("Failed to dexopt: " + res);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user