Fix a destruction of Enumerator objects

This change stops the statistics collection explicitly in the destructor
of Enumerator class, to avoid freeing StatsCollector object twice that
causes SIGABRT.

Also, this modifies the looper message handler to return an error if a
current event has been changed to terminate the collection while it was
in the queue.

Fix: 162631113
Fix: 163813461
Test: Build evs_enumerator_fuzzer and run on the target device
Change-Id: I74b37dc6246575aab207ed1fcce3ef92762a6d9c
Merged-In: I74b37dc6246575aab207ed1fcce3ef92762a6d9c
(cherry picked from commit 0297abf81a9a19368b02098423318830966782e0)
3 files changed
tree: 34ac651dfed78442b50c9bb870b55ea8a8a812f6
  1. car-bugreportd/
  2. car-default-input-service/
  3. car-internal-lib/
  4. car-lib/
  5. car-maps-placeholder/
  6. car-systemtest-lib/
  7. car-test-lib/
  8. car-usb-handler/
  9. car_product/
  10. computepipe/
  11. EncryptionRunner/
  12. evs/
  13. experimental/
  14. FrameworkPackageStubs/
  15. obd2-lib/
  16. packages/
  17. procfs-inspector/
  18. service/
  19. surround_view/
  20. tests/
  21. tools/
  22. user/
  23. vehicle-hal-support-lib/
  24. watchdog/
  25. .clang-format
  26. .gitignore
  27. Android.mk
  28. CleanSpec.mk
  29. CPPLINT.cfg
  30. OWNERS
  31. PREUPLOAD.cfg
  32. README.md
  33. TEST_MAPPING
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.