Merge "Avoid hotspot band updates when country code is inactive" into udc-dev am: f6c0e2d4dd am: b381ab48fc am: 1566527a10

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23341837

Change-Id: Iee1f2b0536746ca5d955e6c3674e7f9a76c5a05e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2023-05-19 08:59:17 +00:00
committed by Automerger Merge Worker
2 changed files with 0 additions and 8 deletions

View File

@@ -102,7 +102,6 @@ public class WifiHotspotRepository {
protected Boolean mIs6gBandSupported; protected Boolean mIs6gBandSupported;
protected Boolean mIs6gAvailable; protected Boolean mIs6gAvailable;
protected MutableLiveData<Boolean> m6gAvailable; protected MutableLiveData<Boolean> m6gAvailable;
protected String mCurrentCountryCode;
protected ActiveCountryCodeChangedCallback mActiveCountryCodeChangedCallback; protected ActiveCountryCodeChangedCallback mActiveCountryCodeChangedCallback;
@VisibleForTesting @VisibleForTesting
@@ -568,17 +567,12 @@ public class WifiHotspotRepository {
@Override @Override
public void onActiveCountryCodeChanged(String country) { public void onActiveCountryCodeChanged(String country) {
log("onActiveCountryCodeChanged(), country:" + country); log("onActiveCountryCodeChanged(), country:" + country);
mCurrentCountryCode = country;
purgeRefreshData(); purgeRefreshData();
refresh(); refresh();
} }
@Override @Override
public void onCountryCodeInactive() { public void onCountryCodeInactive() {
log("onCountryCodeInactive()");
mCurrentCountryCode = null;
purgeRefreshData();
refresh();
} }
} }

View File

@@ -78,7 +78,6 @@ import java.util.List;
public class WifiHotspotRepositoryTest { public class WifiHotspotRepositoryTest {
static final String WIFI_SSID = "wifi_ssid"; static final String WIFI_SSID = "wifi_ssid";
static final String WIFI_PASSWORD = "wifi_password"; static final String WIFI_PASSWORD = "wifi_password";
static final String WIFI_CURRENT_COUNTRY_CODE = "US";
static final int WIFI_5GHZ_BAND_PREFERRED = BAND_2GHZ_5GHZ; static final int WIFI_5GHZ_BAND_PREFERRED = BAND_2GHZ_5GHZ;
static final int WIFI_6GHZ_BAND_PREFERRED = BAND_2GHZ_5GHZ_6GHZ; static final int WIFI_6GHZ_BAND_PREFERRED = BAND_2GHZ_5GHZ_6GHZ;
@@ -112,7 +111,6 @@ public class WifiHotspotRepositoryTest {
mRepository = new WifiHotspotRepository(mContext, mWifiManager, mTetheringManager); mRepository = new WifiHotspotRepository(mContext, mWifiManager, mTetheringManager);
mRepository.mSecurityType = mSecurityType; mRepository.mSecurityType = mSecurityType;
mRepository.mSpeedType = mSpeedType; mRepository.mSpeedType = mSpeedType;
mRepository.mCurrentCountryCode = WIFI_CURRENT_COUNTRY_CODE;
mRepository.mIsDualBand = true; mRepository.mIsDualBand = true;
mRepository.mIs5gAvailable = true; mRepository.mIs5gAvailable = true;
mRepository.mIs6gAvailable = true; mRepository.mIs6gAvailable = true;