summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wifi/java/android/net/wifi/IWifiManager.aidl2
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java19
-rw-r--r--wifi/java/com/android/server/wifi/BaseWifiService.java2
-rw-r--r--wifi/tests/src/android/net/wifi/WifiManagerTest.java19
4 files changed, 1 insertions, 41 deletions
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index c755c0f00469..a97a5a5ec593 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -108,8 +108,6 @@ interface IWifiManager
int getWifiEnabledState();
- void setCountryCode(String country);
-
String getCountryCode();
boolean isDualBandSupported();
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 61cad4827344..00895e846e82 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -2490,25 +2490,6 @@ public class WifiManager {
}
/**
- * Set the country code.
- * @param countryCode country code in ISO 3166 format.
- *
- * @hide
- */
- public void setCountryCode(@NonNull String country) {
- try {
- IWifiManager iWifiManager = getIWifiManager();
- if (iWifiManager == null) {
- if (TextUtils.isEmpty(country)) return;
- throw new RemoteException("Wifi service is not running");
- }
- iWifiManager.setCountryCode(country);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
* get the country code.
* @return the country code in ISO 3166 format.
*
diff --git a/wifi/java/com/android/server/wifi/BaseWifiService.java b/wifi/java/com/android/server/wifi/BaseWifiService.java
index 032a13ec826d..2e82f4e8c23b 100644
--- a/wifi/java/com/android/server/wifi/BaseWifiService.java
+++ b/wifi/java/com/android/server/wifi/BaseWifiService.java
@@ -205,7 +205,7 @@ public class BaseWifiService extends IWifiManager.Stub {
throw new UnsupportedOperationException();
}
- @Override
+ /** @removed */
public void setCountryCode(String country) {
throw new UnsupportedOperationException();
}
diff --git a/wifi/tests/src/android/net/wifi/WifiManagerTest.java b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
index 8beee5708f1d..7e7f00281529 100644
--- a/wifi/tests/src/android/net/wifi/WifiManagerTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
@@ -973,25 +973,6 @@ public class WifiManagerTest {
}
/**
- * Verify that calls WifiServiceImpl to set country code when no exception happens.
- */
- @Test
- public void testSetWifiCountryCode() throws Exception {
- mWifiManager.setCountryCode(TEST_COUNTRY_CODE);
- verify(mWifiService).setCountryCode(TEST_COUNTRY_CODE);
- }
-
- /**
- * Verify that WifiManager.setCountryCode() rethrows exceptions if caller does not
- * have necessary permissions.
- */
- @Test(expected = SecurityException.class)
- public void testSetWifiCountryCodeFailedOnSecurityException() throws Exception {
- doThrow(new SecurityException()).when(mWifiService).setCountryCode(anyString());
- mWifiManager.setCountryCode(TEST_COUNTRY_CODE);
- }
-
- /**
* Test that calls to get the current WPS config token return null and do not have any
* interactions with WifiServiceImpl.
*/