Snap for 10453563 from 1fca03a55868aa9476bd5d6d4f82bfb56e9475a1 to mainline-art-release

Change-Id: I37fc482f2bd58261f5183eaf902c0b4aaa3e0c72
diff --git a/Android.bp b/Android.bp
index e63a6ff..5ebe66f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -67,7 +67,7 @@
            "JavaGen.cpp",
            "TypeChecker.cpp",
            "tests/*.cpp"],
-    whole_static_libs: ["com.android.sysprop.tests"],
+    whole_static_libs: ["libcom.android.sysprop.tests"],
     test_options: {
         unit_test: true,
     },
diff --git a/JavaGen.cpp b/JavaGen.cpp
index fa4c106..55d5ae4 100644
--- a/JavaGen.cpp
+++ b/JavaGen.cpp
@@ -54,6 +54,7 @@
 
 constexpr const char* kJavaParsersAndFormatters =
     R"s(private static Boolean tryParseBoolean(String str) {
+    if (str == null) return null;
     switch (str.toLowerCase(Locale.US)) {
         case "1":
         case "true":
diff --git a/tests/JavaGenTest.cpp b/tests/JavaGenTest.cpp
index 6ae0474..be04a4f 100644
--- a/tests/JavaGenTest.cpp
+++ b/tests/JavaGenTest.cpp
@@ -122,6 +122,7 @@
     private TestProperties () {}
 
     private static Boolean tryParseBoolean(String str) {
+        if (str == null) return null;
         switch (str.toLowerCase(Locale.US)) {
             case "1":
             case "true":
@@ -342,6 +343,7 @@
     private TestProperties () {}
 
     private static Boolean tryParseBoolean(String str) {
+        if (str == null) return null;
         switch (str.toLowerCase(Locale.US)) {
             case "1":
             case "true":