Catch and log RuntimeExceptions thrown by VehicleHal and optionally propagate.

Changes:
- PropertyTimeout/RuntimeException on get() operation (metrics collection)
  is caught and logged
- PropertyTimeout/RuntimeException on set() operation (sending VMS messages)
  is caught, logged, and propagated on eng and userdebug builds as an
  IllegalStateException
- SESSION_START handshakes are sent synchronously to HAL in response to
  client handshake
- Updated VmsHalServiceTest to enable rethrow by default
- Tests added to validate error suppression, but no tests
  added to validate rethrow as this would require major
  refactoring due to VHAL operations being processed on a separate
  thread.

Bug: 142879041
Bug: 137878135
Test: atest AndroidCarApiTest CarServiceTest CarServiceUnitTest
Test: Manual testing on Hawk of crash propagation w/ modified HAL
Change-Id: I6d615fa2764712444a1127bd52f21d3fa95b56e8
2 files changed
tree: a109addf263ab44471916aa1e349b65c80cba19e
  1. car-bugreportd/
  2. car-default-input-service/
  3. car-lib/
  4. car-maps-placeholder/
  5. car-systemtest-lib/
  6. car-test-lib/
  7. car-usb-handler/
  8. car_product/
  9. EncryptionRunner/
  10. evs/
  11. FrameworkPackageStubs/
  12. obd2-lib/
  13. procfs-inspector/
  14. service/
  15. tests/
  16. tools/
  17. user/
  18. vehicle-hal-support-lib/
  19. .clang-format
  20. .gitignore
  21. Android.mk
  22. CleanSpec.mk
  23. OWNERS
  24. PREUPLOAD.cfg
  25. README.md
README.md

Native (C++) code format is required to be compatible with .clang-format file. Run

git clang-format --style=file --extension='h,cpp,cc' HEAD~

Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.