Device can still have a valid networkId even after disconnection if it was associated with AP, getWifiState is a better check to get valid state. Change-Id: I31a8ca38f304fbf639e1f3111be4b5ed406e3b3c