Defaults for List in structured parcelables.
parcelable MyFoo {
String[] a = {"a", "b", "c"};
}
Test: runtests.sh (added tests)
Bug: 110758329
Change-Id: Iada2f2aaf620cc8b1af45f24090ffd98a617d6f9
diff --git a/generate_java.cpp b/generate_java.cpp
index 8d15d15..5660734 100644
--- a/generate_java.cpp
+++ b/generate_java.cpp
@@ -100,7 +100,7 @@
out << "public " << type->JavaType() << (variable->GetType().IsArray() ? "[]" : "") << " "
<< variable->GetName();
if (variable->GetDefaultValue()) {
- out << " = " << variable->ValueString();
+ out << " = " << variable->ValueString(AidlConstantValueDecorator);
}
out << ";\n";
parcel_class->elements.push_back(new LiteralClassElement(out.str()));