summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorSundeep Ghuman <sghuman@google.com>2017-04-19 16:21:46 -0700
committerSundeep Ghuman <sghuman@google.com>2017-04-25 12:37:38 -0700
commitce6bab87e6e37c124f4a23cbbacaf04f23fa95fc (patch)
tree6c22f35839c4385a49c3bc5a39d1b76d13aae60f /tools/aapt2/java/JavaClassGenerator.cpp
parent71f4a82b51f53ba7b99fc7f1d1f81a29b7c88072 (diff)
Use synchronization rather than locking in WifiTracker.
This vastly simplifies WifiTracker usage. The existing locking behavior closed a lock on thread A, depended on thread B to open it, and would block on Thread A until thread B did. However, thread B can also block on this lock, hence if Thread A closes the lock between thread B opening it and blocking on it, and deadlock would result in an ANR that would crash WifiSettings (see b/37530557 for another example). All work on the WorkHandler is now synchronized, as a preliminary step to removing the worker thread altogether, pending discussions with original author on the threads creation. Also fix test flakiness, an indirect byproduct of now simplifying concurrency issues in this class. Fixes b/37581732. Together with the other changes in this topic, this CL resolves all known wifi picker jank and no ANRs have been witnessed. Bug: b/37504190 Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java Change-Id: I0e47a4d50372beb2d141189276b1a4d9230c0d98
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions