summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/pm/OtaDexoptService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/OtaDexoptService.java b/services/core/java/com/android/server/pm/OtaDexoptService.java
index c5f3cfd3bc7e..836b588c7621 100644
--- a/services/core/java/com/android/server/pm/OtaDexoptService.java
+++ b/services/core/java/com/android/server/pm/OtaDexoptService.java
@@ -50,6 +50,9 @@ public class OtaDexoptService extends IOtaDexopt.Stub {
private final static String TAG = "OTADexopt";
private final static boolean DEBUG_DEXOPT = true;
+ // The synthetic library dependencies denoting "no checks."
+ private final static String[] NO_LIBRARIES = new String[] { "&" };
+
private final Context mContext;
private final PackageManagerService mPackageManagerService;
@@ -202,7 +205,13 @@ public class OtaDexoptService extends IOtaDexopt.Stub {
PackageDexOptimizer optimizer = new OTADexoptPackageDexOptimizer(
collectingInstaller, mPackageManagerService.mInstallLock, mContext);
- optimizer.performDexOpt(pkg, pkg.usesLibraryFiles,
+ String[] libraryDependencies = pkg.usesLibraryFiles;
+ if (pkg.isSystemApp()) {
+ // For system apps, we want to avoid classpaths checks.
+ libraryDependencies = NO_LIBRARIES;
+ }
+
+ optimizer.performDexOpt(pkg, libraryDependencies,
null /* ISAs */, false /* checkProfiles */,
getCompilerFilterForReason(compilationReason),
null /* CompilerStats.PackageStats */);