Refactor constant declarations.
In preparation for default values for parcelable members.
Bug: 110758329
Test: boot Pixel 2
Test: runtests.sh
Change-Id: Id9c3f6b2242d66e69206c17cabfd61f8921d40b7
diff --git a/ast_java.cpp b/ast_java.cpp
index c97a907..3b7ca96 100644
--- a/ast_java.cpp
+++ b/ast_java.cpp
@@ -439,7 +439,7 @@
void IntConstant::Write(CodeWriter* to) const {
WriteModifiers(to, STATIC | FINAL | PUBLIC, ALL_MODIFIERS);
- to->Write("int %s = %d;\n", name.c_str(), value);
+ to->Write("int %s = %s;\n", name.c_str(), value.c_str());
}
void StringConstant::Write(CodeWriter* to) const {