Merge "PMSCompilerMapping: Hardcode a value for pm.dexopt.inactive"

am: dc616ab11c

Change-Id: I6b4e8042eb9c657950157dcc49121b24efc196c1
This commit is contained in:
Narayan Kamath
2017-11-01 17:39:12 +00:00
committed by android-build-merger

View File

@@ -47,7 +47,16 @@ public class PackageManagerServiceCompilerMapping {
// Load the property for the given reason and check for validity. This will throw an
// exception in case the reason or value are invalid.
private static String getAndCheckValidity(int reason) {
String sysPropValue = SystemProperties.get(getSystemPropertyName(reason));
String sysPropName = getSystemPropertyName(reason);
String sysPropValue;
// TODO: This is a temporary hack to keep marlin booting on aosp/master while we
// figure out how to deal with these system properties that currently appear on
// vendor.
if ("pm.dexopt.inactive".equals(sysPropName)) {
sysPropValue = "verify";
} else {
sysPropValue = SystemProperties.get(sysPropName);
}
if (sysPropValue == null || sysPropValue.isEmpty() ||
!DexFile.isValidCompilerFilter(sysPropValue)) {
throw new IllegalStateException("Value \"" + sysPropValue +"\" not valid "