14de8b2ce5ef49218e48002a3ac0728847e90372 |
|
19-Aug-2016 |
Ningyuan Wang <nywang@google.com> |
Monitor scan results for current client interface This CL includes the following changes: 1. Add functions which can subscribe and unsubscribe scan results notification in ScanUtils, so we don't need to expose a NetlinkManager object to ClientInterfaceImpl. 2. ClientInterfaceImpl subscribes the scan results when it is initialized. It unsubscribes the scan results when it is destroyed. 3. ClientInterfaceImpl requests scan results objects using ScanUtils. In later CLs these objects are supposed to be sent to java framework through binder. 4. Add corresponding mock classes and unit tests adjustment for the changes above. This CL won't enable the scan results monitoring unless we uncomment SubscribeToEvents() in NetlinkManager::Start(). BUG=30896985 TEST=compile, unit tests, manual tests Manual test: 1. Uncomment SubscribeToEvents() in NetlinkManager::Start(). 2. Call ScanResult::DebugLog() in ClientInterfaceImpl:: OnScanResultsReady(). After 1 and 2 we can see detail scan results in wificond logs. Change-Id: I502fb4704ffce4dd2bf8de8d0d5d9293b2b43d9a
/system/connectivity/wificond/tests/mock_scan_utils.cpp
|