Make Garage Mode more robust in detecting idle-mode jobs

Garage Mode exits when there are no active idle-mode jobs.
Some idle-mode activities schedule additional jobs. This
may lead to slivers of time when no jobs are active, even
though the overall work has not completed.

With this CL, when Garage Mode sees no active idle jobs, it
checks for scheduled idle jobs. If there are no scheduled
idle jobs, Garage Mode exits. If there are scheduled idle
jobs, Garage Mode waits 1 second for a job to become active.

Bug: 148553850
Test: Verified on bench with 'adb logcat'
Change-Id: Ia7712716da27505456fe6daf24b83597c73ddbec
3 files changed
tree: e409bd00fb5abed956e13950dda4d01c1f4b51d5
  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. tests/
  18. tools/
  19. user/
  20. vehicle-hal-support-lib/
  21. watchdog/
  22. .clang-format
  23. .gitignore
  24. Android.mk
  25. CleanSpec.mk
  26. OWNERS
  27. PREUPLOAD.cfg
  28. 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.