Loading
Serially (un/)register score cache in WifiTracker.
Before the cache unregistration logic was posted to the worker thread. However, when WifiSettings is quit, the onDestroy method immediately kills the WorkHandler. This caused unregistration to never occur, which left the cache registered and the listener to try to post work on the dead worker thread. The cache is now registered and unregistered serially in start and stop tracking, respectively. Furthermore, the cachelistener is running on the mainHandler as it is a lightweight task (posting to work handler). Bug: 34891717 Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java Change-Id: I7739fdbe036be5b2870be45f33f670fd69d69af1