Remove all pending callbacks in stopTracking.
This prevents callbacks occurring on the Settings UI thread in the
WifiSettings fragment after its Activity is already destroyed. When
removing pending ACCESS_POINTS_CHANGED_MESSAGES, release the lock.
Also fixed some flakey tests due to threading issues.
Bug: b/37472533
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Change-Id: I764caf52e38b7f7e33c67c7ea3aa3d2301095dca
3 files changed