diff options
| author | 2025-01-28 09:30:11 -0800 | |
|---|---|---|
| committer | 2025-01-29 05:29:38 -0800 | |
| commit | de7c8c4e1bf26312f9973ede86b46091581e69b0 (patch) | |
| tree | ac0c388bf77c4fb65cef7cb310ddd68d4b237fe8 | |
| parent | 07ee801f663fe6f171f542abac39848b7791db59 (diff) | |
Make PackageManager call into ART Service for incremental apps.
This will allow ART Service to verify and activate Cloud Compilation
artifacts for incremental apps on app install in the future.
This is a no-op at the moment, as ART Service will still skip dexopt
for incremental apps.
Bug: 377474232
Flag: EXEMPT refactor
Change-Id: I4846fd8c0a3f2a49349a5ebb08f2f6fa8dbdb621
| -rw-r--r-- | services/core/java/com/android/server/pm/DexOptHelper.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/pm/DexOptHelper.java b/services/core/java/com/android/server/pm/DexOptHelper.java index 24b3765a698a..4ee6e9773199 100644 --- a/services/core/java/com/android/server/pm/DexOptHelper.java +++ b/services/core/java/com/android/server/pm/DexOptHelper.java @@ -851,7 +851,8 @@ public final class DexOptHelper { private static boolean shouldSkipDexopt(InstallRequest installRequest) { PackageSetting ps = installRequest.getScannedPackageSetting(); AndroidPackage pkg = ps.getPkg(); - return pkg == null || pkg.isDebuggable(); + boolean onIncremental = isIncrementalPath(ps.getPathString()); + return pkg == null || pkg.isDebuggable() || onIncremental; } /** @@ -866,7 +867,6 @@ public final class DexOptHelper { final boolean instantApp = ((installRequest.getScanFlags() & SCAN_AS_INSTANT_APP) != 0); final PackageSetting ps = installRequest.getScannedPackageSetting(); final AndroidPackage pkg = ps.getPkg(); - final boolean onIncremental = isIncrementalPath(ps.getPathString()); final boolean performDexOptForRollback = !(installRequest.isRollback() && installRequest @@ -877,7 +877,7 @@ public final class DexOptHelper { // THINK TWICE when you add a new condition here. You probably want to add a condition to // `shouldSkipDexopt` instead. In that way, ART Service will be called with the "skip" // compiler filter and it will have the chance to decide whether to skip dexopt. - return !instantApp && pkg != null && !onIncremental && !isApex && performDexOptForRollback; + return !instantApp && pkg != null && !isApex && performDexOptForRollback; } private static class StagedApexObserver extends IStagedApexObserver.Stub { |