Add 32BIT and 16BIT nanopb library.

Add 32BIT and 16BIT compile time flag for nanopb library to support
16BIT or 32BIT size, default is 8BIT. User need to use the corresponding
library when define the PB_FIELD_* flag during compilation.

Test: None
Bug: 122292884
Change-Id: I1b3c572e54297d020776e7721d37b65526f1a0ff
diff --git a/Android.bp b/Android.bp
index d9378f9..c9c5958 100644
--- a/Android.bp
+++ b/Android.bp
@@ -29,19 +29,45 @@
     ],
     sdk_version: "19",
     export_include_dirs: ["."],
+    vendor_available: true,
 }
 
 cc_library_static {
     name: "libprotobuf-c-nano",
-    vendor_available: true,
     defaults: ["libprotobuf-c-nano-defaults"],
 }
 
 cc_library_static {
     name: "libprotobuf-c-nano-enable_malloc",
-    vendor_available: true,
     defaults: ["libprotobuf-c-nano-defaults"],
 
     cflags: ["-DPB_ENABLE_MALLOC"],
 }
 
+cc_library_static {
+    name: "libprotobuf-c-nano-16bit",
+    defaults: ["libprotobuf-c-nano-defaults"],
+
+    cflags: ["-DPB_FIELD_16BIT"],
+}
+
+cc_library_static {
+    name: "libprotobuf-c-nano-enable_malloc-16bit",
+    defaults: ["libprotobuf-c-nano-defaults"],
+
+    cflags: ["-DPB_ENABLE_MALLOC", "-DPB_FIELD_16BIT"],
+}
+
+cc_library_static {
+    name: "libprotobuf-c-nano-32bit",
+    defaults: ["libprotobuf-c-nano-defaults"],
+
+    cflags: ["-DPB_FIELD_32BIT"],
+}
+
+cc_library_static {
+    name: "libprotobuf-c-nano-enable_malloc-32bit",
+    defaults: ["libprotobuf-c-nano-defaults"],
+
+    cflags: ["-DPB_ENABLE_MALLOC", "-DPB_FIELD_32BIT"],
+}