commit | 369d053cc394308cf8b6c2a30e97ed6289660b92 | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Fri Jun 09 12:42:10 2017 -0700 |
committer | Steven Moreland <smoreland@google.com> | Wed Jul 05 18:54:33 2017 -0700 |
tree | 25709425731beaa6ff22630c99d4a94de80fb650 | |
parent | 73f11e25c9bfd54690d0671ac9d8dc4f9245d86d [diff] |
Try fetching hwservice before waiting for it. This reduces thrashing in the common case. This also has the side effect of registering less service notification listeners with hwservicemanager. This means even though death notifications aren't being received (b/32837397 #10), hwservicemanager will no longer be leaking callback interfaces because after hwservices start, no more will be registered. Caveat: waitForHwService requires the current process to have a hwbinder thread available. This can cause problems if: - a process only has one hwbinder thread - this process calls getService on that hwbinder thread - deadlock occurs since another hwbinder thread won't be automatically started. After this change, this deadlock will no longer occur 100% of the time. Test: boot internal marlin Test: hidl_test Test: repeatedly killing and restarting camera app no longer leaks memory in hwservicemanager. Bug: 62319810 Merged-In: If005575b097313a1014c0cb77fc078df098a24da Change-Id: If005575b097313a1014c0cb77fc078df098a24da
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