[RESTRICT AUTOMERGE] Show add audio dialog for SILENT bugreports.

- Add Status#STATUS_AUDIO_PENDING. Now BugReportService will
  set this status when finishes collecting bugreport for
  SILENT bugreports and show "add audio dialog" right away.
- "Bug report in progress dialog" shows "Show Bug Reports" button.
- Allow adding audio message to SILENT bugreports from:
  BugReportInfoActivity (by default shows the dialog right after
  collecting).
- When adding audio to SILENT bugreport: if user cancels the
  dialog, it deletes the zipfile and sets USER_CANCELED status.
- App shows "bugreport started" toast message after 3 seconds,
  because hardware button doesn't give feedback when bugreport
  is started (e.g. phones vibrate).
- User can cancel bugreport from notification, see
  BugReportActivity#ACTION_CANCEL_BUGREPORT.
- Upload pending bugreports are stored in old directory,
  "bug_reports_pending/". Now bug report in sqlite3 contains
  bugreport_filename and audio_filename.
- Start SILENT bugreport using BugReportService,
  because activity changes the UI state.

Difference from Pi.car cherry pick:
- Modified copying to USB (Q uses documents UI)
- Added permission SYSTEM_ALERT_WINDOW
- Implemented BugStorageProvider#getType() -
  needed when copying to USB

Bug: 145310854
Test: a hawk rig
Test: tested uploading and copying to USB
Test: atest tests/
Change-Id: I90faa3693d70c7da45dbb2db6f2630f4b7f9bec3
18 files changed
tree: 15f00011060f5ad0e9ecbab61aac85d461318c4d
  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.