WifiLogger: manage ring buffers by bytes
At present, we manage the ring buffers by the number of
entries, rather than the number of bytes. Since the size
of an entry is variable, managing by the number of entries
doesn't give us solid control over the amount of memory
used.
To solve this, switch from LimitedCircularArray<byte[]>, to
ByteArrayRingBuffer. ByteArrayRingBuffer limits the number of
bytes, rather than the number of entries.
To facilitate testing, make two of WifiLogger's inner classes
(BugReport and LimitedCircularArray) package-private, instead
of strictly private.
BUG=27264379
TEST=(new) unit tests
Change-Id: I2ed6557bd0b40db3227e1e22ea7ff9f8a27ab2ba
2 files changed