commit | 9c227d9e2415f8a4a68a97f332653914dcd03716 | [log] [tgz] |
---|---|---|
author | cosmohsieh <cosmohsieh@google.com> | Mon Apr 29 14:22:51 2019 +0800 |
committer | cosmohsieh <cosmohsieh@google.com> | Mon Apr 29 15:07:30 2019 +0800 |
tree | 7224bbef7b4fd2c41c096dc7b7a800670d2c275b | |
parent | b09eed23095daeab6a458af9f687d397b142e882 [diff] |
Fix WifiTracker keeps sacnning even if onStop() is called. In critical case, WifiTracker.pauseScanning() and updateWifiState() are called in same time but in different threads, causes racing condition problem. mScanner.resume() will be called after mScanner.pause() but before mScanner is set as null. Adding synchronized to prevent it. Bug: 123404912 Test: atest WifiTrackerTest Change-Id: I3a24fb0830cd1d0c93eca03786c10a1d168de00e