commit | bd33e3854555589f312c4d6d89491e2f5cc2f782 | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Wed Nov 02 13:30:17 2016 -0700 |
committer | Yifan Hong <elsk@google.com> | Thu Nov 03 15:07:03 2016 -0700 |
tree | 48c593ece8aff1f0e631d67d959261d945516557 | |
parent | 6d7b4b11cb52ebb5f8f947706c88e9f3f3ba5d62 [diff] |
Fix array size orders. Note that the following code in HIDL: typedef int32_t[3] ThreeInts; struct T { ThreeInts[5] matrix5x3; int32_t[3][5] matrix3x5; } will generate this C++ code: struct T { hidl_array<int32_t, 5, 3> matrix5x3; // notice 3 is after 5 hidl_array<int32_t, 3, 5> matrix3x5; } and this Java code: public final static class T { public final int[][] matrix5x3 = new int[5][3]; public final int[][] matrix3x5 = new int[3][5]; } Bug: 31438033 Test: hidl_test Test: hidl_test_java Change-Id: I3ac91c461293848e6efb3ae8c11a6a8d932ed79a
croot make hidl-gen
hidl-gen -o output-path -L language (-r interface-root) fqname output-path: directory to store the output files. language: output file for given language. e.g.c++, vts.. fqname: fully qualified name of the input files. For singe file input, follow the format: package@version::fileName For directory input, follow the format: package@version interface-root(optional): prefix and root path for fqname. If not set, use the default prefix: android.hardware and default root path defined in $TOP. examples: hidl-gen -o output -L c++ android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:/home/android/master/hardware/interfaces android.hardware.nfc@1.0