commit | cd25b85b16a6bbfd009d031e614c5251b47c2787 | [log] [tgz] |
---|---|---|
author | Zhomart Mukhamejanov <zhomart@google.com> | Wed Sep 11 18:35:29 2019 -0700 |
committer | Zhomart Mukhamejanov <zhomart@google.com> | Fri Sep 13 19:02:13 2019 -0700 |
tree | b14dc922dade7cfe339532f7e579280fb0cf4e8c | |
parent | 010f59c0fb5dd9019e11e52a989d7f0eb7168cf5 [diff] |
Allow bugreport app to gracefully handle errors. 1. Increase timeout when reading from dumpstate socket in main.cpp. EAGAIN on line main.cpp:107 means socket has no data to read, we should try reading again. Many code I've seen infinitely retries. adb-bugreport tool waits 10 minutes, see frameworks/native/cmds/bugreportz/main.cpp. 2. Start reading from dumpstate socket only if progress returned success, otherwise it just fails - main.cpp:230. 3. Enable logging MediaRecorder events - BugReportActivity:387. 4. Allow gracefully handling media recorder stop errors. BugReportActivity:415. 5. Allow skipping empty files when adding to the final zip. BugReportService:491. Change-Id: Ic1a82fe28ab261ac9bc58477e79ff7819958b63b Bug: 140430647 Test: on a hawk rig (both success and simulated error case)
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.