Add expiring old bugreports from devices.

- BugReport TTL (time-to-live) points is initially 50.
  it's decremented every boot, and when it's reached 0,
  ExpireOldBugReportsJob will delete zip file associated with
  the bugreport.
  It counts only hard reboots (sleep/wakeup is not counted)
- This CL adds tests for BugStorageUtils.getUnexpiredBugReportsWithZipFile(),
  which is used both both TtlPointDecremental and ExpireOldBugreportsJob.

Test: atest packages/services/Car/tests/BugReportApp/tests
Test: on an hawk bench
Bug: 144523228
Change-Id: I2d3158cd4435b39e24cf3d3a542b94d8d23705ce
17 files changed
tree: 4ab31d712ef7610fd9cb6bb2ab4276eeb8b34c8a
  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. computepipe/
  10. EncryptionRunner/
  11. evs/
  12. experimental/
  13. FrameworkPackageStubs/
  14. obd2-lib/
  15. procfs-inspector/
  16. service/
  17. surround_view/
  18. tests/
  19. tools/
  20. user/
  21. vehicle-hal-support-lib/
  22. watchdog/
  23. .clang-format
  24. .gitignore
  25. Android.mk
  26. CleanSpec.mk
  27. CPPLINT.cfg
  28. OWNERS
  29. PREUPLOAD.cfg
  30. README.md
  31. 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.