fix `byte[]` with negative values (C++/NDK)

In C++/NDK backends, byte[] is mapped to vector<uint8_t> while byte
alone is mapped to int8_t. When byte[]'s default value has negative
elements, resulting code won't compile without extra casting.

For example, while `byte[] a = {-1}` is perfectly valid, the C++ output
was `vector<uint8_t> a = {-1}`, which is an error.

Now, those negative values are casted to uint8_t when necessary. This is
fine because of how C++ casting(static_cast) works.

As a side-effect of this fix, C++ backend now doesn't emit extra value
casting (e.g. previously, `int32_t n = int32_t(1);`, but now it's just
`int32_t n = 1;`).

Bug: 204116012
Test: m (no regression)
Test: aidl_unittests
Merged-In: I9bbe9b4e6109502f182fc40bf1dc721ea9738971
Change-Id: I9bbe9b4e6109502f182fc40bf1dc721ea9738971
(cherry picked from commit a96a1090478a3fec8f4db9a2b423c514b4a40b3c)
diff --git a/aidl_to_ndk.cpp b/aidl_to_ndk.cpp
index 1fc4718..6a797bb 100644
--- a/aidl_to_ndk.cpp
+++ b/aidl_to_ndk.cpp
@@ -71,22 +71,7 @@
 };
 
 std::string ConstantValueDecorator(const AidlTypeSpecifier& type, const std::string& raw_value) {
-  if (type.IsArray()) {
-    return raw_value;
-  }
-
-  if (type.GetName() == "long" && !type.IsArray()) {
-    return raw_value + "L";
-  }
-
-  if (auto defined_type = type.GetDefinedType(); defined_type) {
-    auto enum_type = defined_type->AsEnumDeclaration();
-    AIDL_FATAL_IF(!enum_type, type) << "Invalid type for \"" << raw_value << "\"";
-    return NdkFullClassName(*enum_type, cpp::ClassNames::RAW) +
-           "::" + raw_value.substr(raw_value.find_last_of('.') + 1);
-  }
-
-  return raw_value;
+  return cpp::CppConstantValueDecorator(type, raw_value, /*is_ndk=*/true);
 };
 
 static std::function<void(const CodeGeneratorContext& c)> StandardRead(const std::string& name) {