commit | 60aae9fa673ed4e0806c0bae810d024cfcd9c335 | [log] [tgz] |
---|---|---|
author | Martijn Coenen <maco@google.com> | Wed Apr 26 18:39:50 2017 -0700 |
committer | Steven Moreland <smoreland@google.com> | Thu Jul 20 22:39:03 2017 +0000 |
tree | db8adf008d4478f6668c0f6cedbb3fd020974c61 | |
parent | 2522af64f03afc4225845e2c7699c4055d674281 [diff] |
Use String.getBytes().length to determine string length. String.length() returns the number of UTF-16 code units, but hidl_string objects are encoded in UTF-8; this will cause verification failures in strings that are valid UTF-8, but have a different number of code units in (Java's) UTF-16 encoding than in the native UTF-8 encoding. Bug: 37722371 Bug: 63899698 Test: hidl_test_java with shiny UTF-8 string (that requires a different number of code units in UTF-16) Merged-In: I4fcf12c91b306c54c73013aef11bb049cb09190a Change-Id: I4fcf12c91b306c54c73013aef11bb049cb09190a
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: croot hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -L hash -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0