WifiStateMachine: Dont repeatedly call sendExplicitlySelected
Use the last selected network timestamp
(WifiConfigManager.getLastSelectedTimestamp) to limit the invocation of
NetworkAgent.sendExplicitlySelected. The current expiration is set at 30
seconds to prevent the user from receiving notifications about lack of
internet connectivity repeatedly on the same network.
Bug: 62503737
Test: Added a unit test for the helper function. Ideally would have
wanted to use a mock WifiNetworkAgent and capture the interaction on it,
but because of the way WSM is designed currently, it's impossible to use
a WifiInjector to mock it out.
Change-Id: I342b617769141c3e8071e5aba89efebe42c97390
Merged-In: I342b617769141c3e8071e5aba89efebe42c97390
2 files changed