summaryrefslogtreecommitdiff
path: root/cmds/incidentd/src/WorkDirectory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix Wbitwise-instead-of-logical introduced by clang-r445002" am: ↵Pirama Arumuga Nainar2022-01-281-1/+1
|\ | | | | | | | | | | | | | | 9f165ca3e1 am: 665796dd6d am: bdd7c5eb53 am: 138c4fe4bc Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1961919 Change-Id: I7cbc2ef02aa2b6f235d6a63aa008f9764188f30d
| * Fix Wbitwise-instead-of-logical introduced by clang-r445002Pirama Arumuga Nainar2022-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: http://b/215753485 frameworks/base/cmds/incidentd/src/WorkDirectory.cpp:283:38: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] report->set_all_sections(report->all_sections() | args.all()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ || frameworks/base/cmds/incidentd/src/WorkDirectory.cpp:283:38: note: cast one or both operands to int to silence this warning Test: Build with new clang Change-Id: I8dc614e274c95f8941bf390cb68c60d0328bb31b
* | Increase size limitsRafal Slawik2022-01-121-1/+1
|/ | | | | | | | | | | | Incidents contain traces with average size of 8 MB. We hit the upload size limit of 100 MB before the upload count limit of 50. Increase the size limit to 400 MB to upload more traces. Previous increase: http://ag/7695408 Bug: 214244170 Test: incidentd_test Change-Id: Iae2f856d375f126f23191d152e4a46243fa3f38f
* Close the FD after opening the fileJeffrey Huang2021-03-301-0/+6
| | | | | | Bug: 183758470 Test: Manually took incident report and verified the file is deleted Change-Id: I040306c2365bcf98efde94fcc15575c9131f3b0e
* Add an option to zip incident reportMike Ma2020-03-051-3/+33
| | | | | | | | | | Incident reports are getting bigger as we add more sections. Add an option (-z, default off) to zip incident report. Bug: 150160547 Test: atest incidentd_test Test: adb shell incident -z -p EXPLICIT | gunzip | ./out/soong/host/linux-x86/bin/aprotoc --decode=android.os.IncidentProto --proto_path=./ --proto_path=external/protobuf/src frameworks/base/core/proto/android/os/incident.proto Change-Id: I7c8ff1d91df842c200462ee29f15feae68e62739
* Always use a positive value for timestampjoker.yang2019-12-181-1/+1
| | | | | | | | on go device when try to get timestamp, the value over-followed sometimes as a result, GtsIncidentManagerTestCases would fail due to a negative timestamp Bug: 142513252 Change-Id: I7d5e701bb8bf4e788a718e093681f97b95cb8551
* Merge "Fix integer overflow in make_timestamp_ns_locked" into qt-qpr1-devRoman Kiryanov2019-08-231-1/+1
|\ | | | | | | | | | | am: 1d20f2096c Change-Id: I963c419c063447a54b35aa1dff282cd058368af7
| * Fix integer overflow in make_timestamp_ns_lockedRoman Kiryanov2019-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | timespec::tv_sec is time_t which is 32bit wide on 32bit platforms. Multipliyng 32bit integers (tv_sec and 1000) produces another 32bit integer which overflows in this case and turns into a negative value which confuses the logic downstream. This change makes the multiplication to be 64bit which prevent the overflow. Bug: 139320584 Bug: 139538727 Test: GtsIncidentManagerTestCases Change-Id: Ie956074961c7c1f08e2519920f7ce69d5c9e12d3 Signed-off-by: Roman Kiryanov <rkir@google.com> (cherry picked from commit e9db937f4008f097f4ee9dc341a3afc219a96fd9)
* | Adapt to google::protobuf::int64 type changeColin Cross2019-08-141-1/+1
|/ | | | | | | | | | | Protobuf 3.9.1 redefines google::protobuf::int64 from long long to int64_t, which is sometimes long and sometimes long long. Use PRIi64 to print it. Also temporarily cast to int64_t to decouple this change from the change that updates protobuf. Bug: 117607748 Test: m checkbuild Change-Id: I482b957d2262e5001140ed1153c7de2b17facae2
* Increase the size limit of incident reports.Yao Chen2019-05-231-1/+1
| | | | | | Bug: 133425862 Test: incidentd_test Change-Id: I323878958a93e0280b782de1745ed59e44f79b0b
* Add metadata and headers to incident reports.Yao Chen2019-04-021-38/+30
| | | | | | | | | | | | | | | | | | + Remove the spawned thread inside the ReportFile for filter_and_write_report because it leads to accessing freed memory Instead, let the caller of ReportFile::startFileteringData create the thread. ReportFile class shouldn't care about whether it's writing to a pipe for IPC or regular file. + Add uri building in incidentd + Add metadata and headers to incident reports Test: existing passed tests in incidentd_test still pass. Manually tested with statsd Change-Id: I5fef900d31f5d181275814f1e1c8c98443f201a7
* incidentd can now handle multiple callers asking it for incident reportsJoe Onorato2019-03-261-0/+844
Test: bit incident_test:* GtsIncidentManagerTestCases:* Bug: 123543706 Change-Id: I9f671dd5d8b2ad139f952a23e575c2be16120459