Wifi: Reset country code during cellular loss

If Wifi receives a country code update from Telephony
(ACTION_NETWORK_COUNTRY_CHANGED), there is no reason to
poll the country again from Telephony in the same context
using the getNetworkCountryIso. Not only this is sub-optimal,
it also exposes a race condition where the getNetworkCountryIso
returns a different country code as getNetworkCountryIso uses
EmergencyNumberTracker as a source and may not have handled
ACTION_NETWORK_COUNTRY_CHANGED yet and updated country code.

Bug: 177633488
Test: atest com.android.server.wifi
Change-Id: Idc92967d8ee4ac4b60ba759c552ba62e184e9b6e
1 file changed