Wifi: Reset wifi networks for factory reset if wifi is off  state

Framework enables wifi and query for saved networks to reset. These two
operations are sequential. Saved profiles are generated in framework once
wifi turn on process completes. If the factory reset is attempted when
the Wi-Fi is TURNED OFF, the networks queried would be NULL, and thus they
shall not be cleared.

To fix this issue, listen for wifi state change events, and reset the networks
once wifi state enabled event is received.

Change-Id: I846186ae2867bf4657774d6511bd8e0635b249ac
CRs-Fixed: 1043902
1 file changed
tree: 066ced9010b77be9298843319d99e7617e7f28f0
  1. service/
  2. tests/