Fix race condition for mNetworkAgent

To prevent WifiService thread and WifiStateMachine
thread access and modify mNetworkAgent at the same time,
we need to make sure the synchronization.

Test: Wi-Fi on and confirm no abnormal exception occurs
Bug: 116289703
Change-Id: I2bf380ae4b063956687a2120f254379c34597cf4
(cherry-picked from bc6cbaad5f9000070eb7e50b4e9a439eeedde2a7)
1 file changed