summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNingyuan Wang <nywang@google.com>2016-07-27 01:39:45 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-07-27 01:39:45 +0000
commit66b5e76660cd6dcede847c39af3e8dcd33f27361 (patch)
treea26d94c34e11ae65e326c796b26093557b10f5b5 /tests
parent8382101e121df0d8fc27e5cce74954591b96859a (diff)
parent37b06cd7aae7fe27cfaf1d95cc9901548765406b (diff)
Fix tethering failure when wifi is not started
am: 37b06cd7aa Change-Id: Ib6bfbf4affb36e1258947099b592878169b52a4d
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java b/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java
index 2e62a309b..faa2f71f8 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java
@@ -71,7 +71,7 @@ public class WifiCountryCodeTest {
// Wifi get L2 connected.
mWifiCountryCode.setReadyForChange(false);
verify(mWifiNative).setCountryCode(anyString());
- assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
}
/**
@@ -81,13 +81,13 @@ public class WifiCountryCodeTest {
@Test
public void useTelephonyCountryCode() throws Exception {
mWifiCountryCode.setCountryCode(mTelephonyCountryCode, false);
- assertEquals(null, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(null, mWifiCountryCode.getCountryCodeSentToDriver());
// Supplicant started.
mWifiCountryCode.setReadyForChange(true);
// Wifi get L2 connected.
mWifiCountryCode.setReadyForChange(false);
verify(mWifiNative).setCountryCode(anyString());
- assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
}
/**
@@ -98,13 +98,13 @@ public class WifiCountryCodeTest {
public void setTelephonyCountryCodeAfterSupplicantStarts() throws Exception {
// Supplicant starts.
mWifiCountryCode.setReadyForChange(true);
- assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
// Telephony country code arrives.
mWifiCountryCode.setCountryCode(mTelephonyCountryCode, false);
// Wifi get L2 connected.
mWifiCountryCode.setReadyForChange(false);
verify(mWifiNative, times(2)).setCountryCode(anyString());
- assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
}
/**
@@ -120,11 +120,11 @@ public class WifiCountryCodeTest {
// Telephony country code arrives.
mWifiCountryCode.setCountryCode(mTelephonyCountryCode, false);
// Telephony coutry code won't be applied at this time.
- assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
mWifiCountryCode.setReadyForChange(true);
// Telephony coutry is applied after supplicant is ready.
verify(mWifiNative, times(2)).setCountryCode(anyString());
- assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
}
/**
@@ -138,15 +138,15 @@ public class WifiCountryCodeTest {
mWifiCountryCode.setReadyForChange(true);
// Wifi get L2 connected.
mWifiCountryCode.setReadyForChange(false);
- assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
// SIM card is removed.
mWifiCountryCode.simCardRemoved();
// Country code restting is not applied yet.
- assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
mWifiCountryCode.setReadyForChange(true);
// Country code restting is applied when supplicant is ready.
verify(mWifiNative, times(2)).setCountryCode(anyString());
- assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
}
/**
@@ -160,15 +160,15 @@ public class WifiCountryCodeTest {
mWifiCountryCode.setReadyForChange(true);
// Wifi get L2 connected.
mWifiCountryCode.setReadyForChange(false);
- assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
// Airplane mode is enabled.
mWifiCountryCode.simCardRemoved();
// Country code restting is not applied yet.
- assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
mWifiCountryCode.setReadyForChange(true);
// Country code restting is applied when supplicant is ready.
verify(mWifiNative, times(2)).setCountryCode(anyString());
- assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
}
/**
@@ -188,6 +188,6 @@ public class WifiCountryCodeTest {
// Wifi get L2 connected.
mWifiCountryCode.setReadyForChange(false);
verify(mWifiNative).setCountryCode(anyString());
- assertEquals(persistentCountryCode, mWifiCountryCode.getCurrentCountryCode());
+ assertEquals(persistentCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
}
}