summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorjackqdyulei <jackqdyulei@google.com>2017-08-03 15:46:52 -0700
committerjackqdyulei <jackqdyulei@google.com>2017-08-29 15:30:42 -0700
commit0e3504c0fafb3506b1590f37b1633024384a6d28 (patch)
tree3cd75eb4d414c93d43c985535e1fbd7e08a2bd5a /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent6a1dad9194170edb01e4e02ab42db1e3e595ddba (diff)
Add static lock in PowerProfile
Before this cl, there exists nullpointer crash in PowerProfile in following part: "sPowerMap.containsKey(key) && (Double) sPowerMap.get(key) > 0" To my best knowledge, it is because in PowerUsageSummary.SummaryProvider, we may create batterystats in meantime: 1. setListening is invoked in worker thread, in which we will force update the batterystats. 2. In setListening we will register receiver, which may update batterystats through onReceive in UI thread. This cl adds static lock in PowerProfile, making the init part can only be accessed by an thread at a time. Bug: 64209576 Test: Manual Change-Id: I00bc094f44416669b4f0e11e647b0fae2ff61013
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions