commit | 820f9d71d4292706a4550bd29131c556aea473f6 | [log] [tgz] |
---|---|---|
author | Dmitri Plotnikov <dplotnikov@google.com> | Fri Jan 19 11:16:42 2024 -0800 |
committer | Dmitri Plotnikov <dplotnikov@google.com> | Mon Jan 22 14:34:01 2024 -0800 |
tree | ec9d7c4b18078ea399432b2f39ef7cf4a63d48c9 | |
parent | 97d24320c1a1e701da531f90773e69e062c12e5e [diff] |
Synchronize access to BatteryStatsHistory This CL closes an overlooked concurrency issue, namely that when we create a copy of BH we clone the buffer Parcel inside. If the parcel is resized, especially relocated, during this operation, we get a disastrous crash. Bug: 320475371 Test: atest PowerStatsTests Change-Id: Ied409ea5cd7d083c2f191604530f52dc48999bf1