summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorDmitri Plotnikov <dplotnikov@google.com>2021-12-16 11:36:51 -0800
committerDmitri Plotnikov <dplotnikov@google.com>2021-12-29 02:19:42 +0000
commitc635cfddc776e44aaae62893dbbfcae6c35fe40a (patch)
tree39601e6ad2253e84dd1168101d4005a2ea238a6b /core/java/android/inputmethodservice/InputMethodService.java
parentbc6a601f583e80672dd7ba54bbaeffac543aabd1 (diff)
Fix concurrency issue with BatteryUsageStats
BatteryUsageStats is created under a BatteryStatsImpl lock. One of the elements of BatteryUsageStats is the battery history buffer Parcel. Once the BatteryUsageStats object is created, the BatteryStatsImpl lock is released and the history buffer parcel continues to be appended by BatteryStatsImpl. The Parcel may even be reset altogether if the battery stats session is reset. The BatteryUsageStats object is parceled during the getBatteryUsageStats binder call. Any modification of the history buffer concurrent with parceling causes a crash. Bug: 194256984 Test: atest FrameworksCoreTests:BatteryUsageStatsTest FrameworksCoreTests:BatteryUsageStatsProviderTest Change-Id: Ifb03a32275dfbea172cd28309a42349d6dd4bcd5
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
0 files changed, 0 insertions, 0 deletions