6b7f0700d3771e552964cf24ab9887275c310c4b |
|
03-Apr-2017 |
Yifan Hong <elsk@google.com> |
Add Formatter::operator<< for integer types / char It only had operator<< for size_t, but VTS is using implicit conversions to size_t. Explicit declare these types. operator<<(char) now actaully output the char. So operator<<(int8_t) operator<<(uint8_t) would not work as expected. Checked VTS code to make sure this doesn't happen. Test: make vts Test: make Change-Id: I5cf30bbeecdfdb441985eeb458c4eb5806fa29df
/system/tools/hidl/utils/Formatter.cpp
|
31f07ffea072ad066bc73181f3368951ba21f50d |
|
21-Mar-2017 |
Yifan Hong <elsk@google.com> |
Revert "Revert "getService should retry if getting nullptr"" Test: take picture with different modes Test: take video Test: take screenshot Test: video plays Test: after these steps, lshal doesn't have extra PIDs for gralloc passthrough hal. Test: dmesg doesn't have denials. Bug: 36153684 Bug: 36383997 Bug: 36462585 This reverts commit 2f7abc9a96e58e693f0db7b0c7fcf59a856a4008. Change-Id: I5d087d55caaf38a94dae7d06ded3179041994953
/system/tools/hidl/utils/Formatter.cpp
|
2f7abc9a96e58e693f0db7b0c7fcf59a856a4008 |
|
17-Mar-2017 |
Ian Pedowitz <ijpedowitz@google.com> |
Revert "getService should retry if getting nullptr" This reverts commit 64ba3d79879ac8bb406f29ef1a7a52a67d2b8f65. Bug: 36383997 Bug: 36153684 Test: lunch aosp_marlin-userdebug && m -j40 Change-Id: I48fc6255fa11c8acda363807cb492a9c4bbbfeff
/system/tools/hidl/utils/Formatter.cpp
|
64ba3d79879ac8bb406f29ef1a7a52a67d2b8f65 |
|
15-Mar-2017 |
Yifan Hong <elsk@google.com> |
getService should retry if getting nullptr for transport == hwbinder / toggled only. If a service is dead but hwservicemanager has not receive the death notification yet, getService retrieved the service, called interfaceChain() into it, failed, and returned nullptr. With this change, getService retries until it gets an alive service from hwservicemanager. For transport == passthrough, the logic is not touched. Refactored getService so that the code is easier to read. Bug: 36153684 Test: killing system_server on the phone, logging shows that getService actually retries, and audio still works without the workaround. Change-Id: Ib380d3f6665d7b3ff0cfb77c16f5b09f20003c00
/system/tools/hidl/utils/Formatter.cpp
|
4de083b1791414410fd9add633ccbb8e56b15036 |
|
16-Mar-2017 |
Martijn Coenen <maco@google.com> |
Release reply Parcel when transaction is done. To prevent the binder memory window from overflowing. Test: hidl_test_java Bug: 36088202 Change-Id: I1261628f31c0aa3ecba7e93630a2eb33229d377b
/system/tools/hidl/utils/Formatter.cpp
|
e45b5303e072043679483a70606f6c00dde17382 |
|
22-Feb-2017 |
Yifan Hong <elsk@google.com> |
Add toString to Java code * toString is mainly for debugging purposes. * For structs and interfaces, add Object.toString. * For enums, add MyEnum.toString(int) and MyEnum.dumpBitfield(int). Use them as follows: * For enums, use the static method E.toString(int). * For bitfields, use the static method E.dumpBitfield(int). * For all arrays, use java.utils.Arrays.deepToString(o) * For everything else, use one of the following: * o.toString(), if o is not null * Object.toString(o) * String.valueOf(o) * Note that for array / vec of enums / bitfields, the raw integer value is dumped. Bug: 33459772 Test: hidl_test_java Change-Id: Ifb1ed519770b907e0a4e345b2c3109dc322a23b2
/system/tools/hidl/utils/Formatter.cpp
|
f5cc2f74e86504f7904a0a24e7fcc00fa19cd579 |
|
05-Jan-2017 |
Yifan Hong <elsk@google.com> |
Emit toString functions for all types. * toString() is mainly for debugging purposes only. * For HIDL internal types (hidl_string, hidl_vec, etc.) toString() is found in ::android::hardware::details. * For a user defined type android.hardware.foo@1.0::IFoo.Type, toString() is found in ::android::hardware::foo::V1_0. * For bitfield<::anroid::hardware::foo::V1_0::T> that gets translated to the underlying numeric type of T, it doesn't make sense to override toString(). A templated toString() function for each user-defined HIDL enum \ is introduced into the same namespace; call it with using namespace ::android::hardware::foo::V1_0; toString<IFoo::MyEnumType>(value); Test: hidl_test and look at the output of logcat Bug: 33459772 Change-Id: I70eee018e31d700bf1376334276dbd343af5615f
/system/tools/hidl/utils/Formatter.cpp
|
a018ed53b332ed0d184ae4c53e89a2036f117b58 |
|
14-Dec-2016 |
Yifan Hong <elsk@google.com> |
Add a chain style to formatter. It is now valid to do, for example: out.sIf("condition", [&] { out << "statement1;" << "\n" << "statement2;" << "\n"; }).endl(); Test: compiles Test: hidl_test Change-Id: Iab104644a005ac8386813a0f249a87ebd0284837
/system/tools/hidl/utils/Formatter.cpp
|
33223ca2a9b8126d357e0986905fa35c0970a30e |
|
14-Dec-2016 |
Yifan Hong <elsk@google.com> |
Rename indentBlock to indent. No reason to add "block" to the name. Test: compiles Change-Id: I8a930cb8d9bb7d03d302c0b9c308ab6d40045260
/system/tools/hidl/utils/Formatter.cpp
|
0a68a28cde91706a64b0465b24c7171f9f4cde99 |
|
22-Oct-2016 |
Yifan Hong <elsk@google.com> |
Better indent methods to Formatter. Test: mma Test: look at output of PointerAll.cpp. Change-Id: Ide841ad76a906de07895f416e8e43209ecda847d
/system/tools/hidl/utils/Formatter.cpp
|
2009699f1106709cf4bfb281e78efb4f3d04f1c6 |
|
29-Sep-2016 |
Yifan Hong <elsk@google.com> |
c2hal: Fix note comments that embeds */ Test: `make c2hal` and examine the result for c2hal/test/test.h Change-Id: I58f9e8dd8decb2d87427cc2b672fd983a7a70ef2
/system/tools/hidl/utils/Formatter.cpp
|
b06cc82425d035b14e4d86a50d5980b836f067fd |
|
26-Sep-2016 |
Yifan Hong <elsk@google.com> |
Use 4 spaces of indentation for hidl-gen and c2hal. c2hal: HIDL requires 4 spaces for indentations as per HIDL Code Style Guideline. hidl-gen: generated C++ should have 4 spaces for indentation as per Android Framework C++ Code Style Guideline. Bug: 31546082 Need a HIDL style guide and c2hal to observe it Test: `mma` Change-Id: Ia825327e63e1a4a36e7e7758d55cc7796a73cc5b
/system/tools/hidl/utils/Formatter.cpp
|
a72e0d2be173cebf62f728b9d215808bd862f219 |
|
09-Sep-2016 |
Iliyan Malchev <malchev@google.com> |
Revert "Revert "Split out libhidl-gen and libhidl-gen-utils."" Shared code between hidl-gen, c2hal, and VTS. Also build for device, as we might use libhidl-gen reflectively in future (for profiling and instrumentation). Change-Id: Ia56901f4afbc12b7c2abee693e0ebea97ba76a8b
/system/tools/hidl/utils/Formatter.cpp
|
194c2ffccef2dd1c515397e597f26b184bc1269b |
|
10-Sep-2016 |
Steven Moreland <smoreland@google.com> |
Revert "split out libhidl-gen and libhidl-gen-utils" This reverts commit 1316091aaf89abc73ab11539b61b20f13ee261c4. Change-Id: I97acad6cadd847cb5540ffe0258b081d7901c1e9
/system/tools/hidl/utils/Formatter.cpp
|
1316091aaf89abc73ab11539b61b20f13ee261c4 |
|
09-Sep-2016 |
Iliyan Malchev <malchev@google.com> |
split out libhidl-gen and libhidl-gen-utils Shared code between hidl-gen, c2hal, and VTS. Also build for device, as we might use libhidl-gen reflectively in future (for profiling and instrumentation). Change-Id: Iffdcbf99308e1f69a504e89fcbb4c9447a6bbe7e Signed-off-by: Iliyan Malchev <malchev@google.com>
/system/tools/hidl/utils/Formatter.cpp
|