Update ArtManagerService for new profilebootclasspath properties

Added logic to use profilebootclasspath properties instead of
profilebootimage.

Bug: 139883463
Bug: 144173681
Test: manual
Change-Id: I5b2947acbb77476b6dc7eed94e713ef7e8fb8f07
This commit is contained in:
Mathieu Chartier
2019-11-11 13:15:34 -08:00
parent e385ff5067
commit 88db67cd49

View File

@@ -314,9 +314,13 @@ public class ArtManagerService extends android.content.pm.dex.IArtManager.Stub {
case ArtManager.PROFILE_APPS :
return SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false);
case ArtManager.PROFILE_BOOT_IMAGE:
// The device config property overrides the system property version.
boolean profileBootClassPath = SystemProperties.getBoolean(
"persist.device_config.runtime_native_boot.profilebootclasspath",
SystemProperties.getBoolean("dalvik.vm.profilebootclasspath", false));
return (Build.IS_USERDEBUG || Build.IS_ENG) &&
SystemProperties.getBoolean("dalvik.vm.usejitprofiles", false) &&
SystemProperties.getBoolean("dalvik.vm.profilebootimage", false);
profileBootClassPath;
default:
throw new IllegalArgumentException("Invalid profile type:" + profileType);
}