diff options
3 files changed, 18 insertions, 26 deletions
diff --git a/services/core/java/com/android/server/pm/DexOptHelper.java b/services/core/java/com/android/server/pm/DexOptHelper.java index 51793f65f7a1..c60f0afcc2ff 100644 --- a/services/core/java/com/android/server/pm/DexOptHelper.java +++ b/services/core/java/com/android/server/pm/DexOptHelper.java @@ -46,7 +46,6 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApexStagedEvent; -import android.content.pm.Flags; import android.content.pm.IPackageManagerNative; import android.content.pm.IStagedApexObserver; import android.content.pm.PackageManager; @@ -663,9 +662,7 @@ public final class DexOptHelper { } }, new IntentFilter(Intent.ACTION_LOCKED_BOOT_COMPLETED)); - if (Flags.useArtServiceV2()) { - StagedApexObserver.registerForStagedApexUpdates(artManager); - } + StagedApexObserver.registerForStagedApexUpdates(artManager); } /** @@ -750,9 +747,7 @@ public final class DexOptHelper { & PackageManager.INSTALL_IGNORE_DEXOPT_PROFILE) != 0; /*@DexoptFlags*/ int extraFlags = - ignoreDexoptProfile && Flags.useArtServiceV2() - ? ArtFlags.FLAG_IGNORE_PROFILE - : 0; + ignoreDexoptProfile ? ArtFlags.FLAG_IGNORE_PROFILE : 0; DexoptParams params = dexoptOptions.convertToDexoptParams(extraFlags); DexoptResult dexOptResult = getArtManagerLocal().dexoptPackage( snapshot, packageName, params); diff --git a/services/core/java/com/android/server/pm/InstallRequest.java b/services/core/java/com/android/server/pm/InstallRequest.java index 43075a232a23..c10196f1ce9b 100644 --- a/services/core/java/com/android/server/pm/InstallRequest.java +++ b/services/core/java/com/android/server/pm/InstallRequest.java @@ -35,7 +35,6 @@ import android.apex.ApexInfo; import android.app.AppOpsManager; import android.content.pm.ArchivedPackageParcel; import android.content.pm.DataLoaderType; -import android.content.pm.Flags; import android.content.pm.IPackageInstallObserver2; import android.content.pm.PackageInstaller; import android.content.pm.PackageManager; @@ -951,7 +950,7 @@ final class InstallRequest { // Only report external profile warnings when installing from adb. The goal is to warn app // developers if they have provided bad external profiles, so it's not beneficial to report // those warnings in the normal app install workflow. - if (isInstallFromAdb() && Flags.useArtServiceV2()) { + if (isInstallFromAdb()) { var externalProfileErrors = new LinkedHashSet<String>(); for (PackageDexoptResult packageResult : dexoptResult.getPackageDexoptResults()) { for (DexContainerFileDexoptResult fileResult : diff --git a/services/usage/java/com/android/server/usage/StorageStatsService.java b/services/usage/java/com/android/server/usage/StorageStatsService.java index 883c702ddb79..e9da53a8a899 100644 --- a/services/usage/java/com/android/server/usage/StorageStatsService.java +++ b/services/usage/java/com/android/server/usage/StorageStatsService.java @@ -968,22 +968,20 @@ public class StorageStatsService extends IStorageStatsManager.Stub { stats.libSize += getDirBytes(new File(sourceDirName + "/lib/")); // Get dexopt, current profle and reference profile sizes. - if (SystemProperties.getBoolean("dalvik.vm.features.art_managed_file_stats", false)) { - ArtManagedFileStats artManagedFileStats; - try (var snapshot = getPackageManagerLocal().withFilteredSnapshot()) { - artManagedFileStats = - getArtManagerLocal().getArtManagedFileStats(snapshot, packageName); - } - - stats.dexoptSize += - artManagedFileStats - .getTotalSizeBytesByType(ArtManagedFileStats.TYPE_DEXOPT_ARTIFACT); - stats.refProfSize += - artManagedFileStats - .getTotalSizeBytesByType(ArtManagedFileStats.TYPE_REF_PROFILE); - stats.curProfSize += - artManagedFileStats - .getTotalSizeBytesByType(ArtManagedFileStats.TYPE_CUR_PROFILE); - } + ArtManagedFileStats artManagedFileStats; + try (var snapshot = getPackageManagerLocal().withFilteredSnapshot()) { + artManagedFileStats = + getArtManagerLocal().getArtManagedFileStats(snapshot, packageName); + } + + stats.dexoptSize += + artManagedFileStats + .getTotalSizeBytesByType(ArtManagedFileStats.TYPE_DEXOPT_ARTIFACT); + stats.refProfSize += + artManagedFileStats + .getTotalSizeBytesByType(ArtManagedFileStats.TYPE_REF_PROFILE); + stats.curProfSize += + artManagedFileStats + .getTotalSizeBytesByType(ArtManagedFileStats.TYPE_CUR_PROFILE); } } |