8 Commits

Author SHA1 Message Date
Joe Onorato
dcd64522f4 Add ProtoOutputStream.serializeToVector
Bug: 132890298
Test: bit libprotoutil_test:*
Change-Id: I44bbeea9c487e0142bcd5f18562f5a092e8b6306
2019-05-21 13:29:23 -07:00
Joe Onorato
05270525ee Fix EncodedBuffer_test to run after making EncodedBuffer inherit from RefBase
Test: bit libprotoutil_test:*
Bug: 129717537
Change-Id: I44cf2e631a5ac1bb8b4ee2c269cfc50438fb1782
2019-05-16 00:51:18 +00:00
Tej Singh
f53d445cef Persist active metric status across system server
Previously, all metrics/configs would deactivate on system server death.
Now, active status is restored.

Bug: 129717537
Test: bit statsd_test:*
Test: libprotoutil_test:ProtoOutputStream*
Change-Id: Idf372457f60a931a2d00176a5eab58c534a25e41
2019-05-13 15:37:19 -07:00
Joe Onorato
ceece48518 Fix the build
Change-Id: I770ed6fd8de0479655f587db68a09882eb6cceb5
2019-03-27 00:23:20 -07:00
Yi Jin
18678bdca0 Empty output if compact fails.
There must be equal number of start/end calls with right token given in
order, if used in wrong order, ProtoOutputStream will have empty output.

Also refactor Android.bp, so the gtest is standalone unit test, it used
to require compile/push libprotoutil.so to device.

Bug: 77342154
Test: atest libprotoutil_test
Change-Id: I0011bbab34c04cb38164d2ed21cd818d52a2ecf9
2018-04-27 14:16:50 -07:00
Yi Jin
fd2a4c791e Use c++ template to reduce duped code.
Bug: 77342154
Test: atest libprotoutil_test
Change-Id: I6cf165c2214a8a627722a156b7498d0d8f5d1e18
2018-04-26 14:28:12 -07:00
Yi Jin
c3d4b28a76 Add unit tests to libprotoutil.
Bug: 77342154
Test: atest libprotoutil_test
Change-Id: I57f31f5cf83b635b200a93cbc655fac7f5edfbd5
2018-04-26 12:00:46 -07:00
Yi Jin
ad3e6e5d5a This cl tries to fix cts tests IncidentdTest
1. Disable BatteryType section which is device-specific
2. Make timeout longer since meminfo section timedout in test
3. make some negative values sint
4. varint can be 64 bits, there is a bug implicitly convert it to 32
which loses values.
5. Found another bug which failed to read 64 bits varint, create a
native test to make sure it works.

Bug: 77291057
Test: atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdTest
Change-Id: I04cc730741f7901f37ac57a11af7777d57118a23
2018-04-04 16:29:55 -07:00