summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vinit Deshapnde <vinitd@google.com> 2014-03-20 19:47:42 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2014-03-20 19:47:42 +0000
commitffb3e595cc4adbe0c31887e42e2200b77d93a024 (patch)
treefe85542872b6697fc3c04738c3a3e6e6bd6f9fb7
parent5c43c35790663442935c901730b5a4403311f254 (diff)
parentbb7fdd6e0a421ae31cf46002398a705235bb7916 (diff)
am bb7fdd6e: am b876cae9: am f92b0072: am 52bc363c: Merge "DO NOT MERGE - Use Samoa country code to satisfy wifi regulatory concerns" into klp-dev
* commit 'bb7fdd6e0a421ae31cf46002398a705235bb7916': DO NOT MERGE - Use Samoa country code to satisfy wifi regulatory concerns
-rw-r--r--core/res/res/values/config.xml4
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java5
3 files changed, 9 insertions, 1 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 4449b4a79db7..552b129bd7f3 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -352,6 +352,10 @@
<!-- Wifi driver supports batched scan -->
<bool translatable="false" name="config_wifi_batched_scan_supported">false</bool>
+ <!-- Wifi driver's fallback country code; WS is ISO-Alpha2 code for Samoa which
+ has restrictions on can be scanned; which may satisfy quite a few regulatory issues. -->
+ <string translatable="false" name="config_wifi_unknown_country_code">WS</string>
+
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">false</bool>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 84510a8b20f8..093eb3bd0a81 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -478,6 +478,7 @@
<java-symbol type="string" name="config_ntpServer" />
<java-symbol type="string" name="config_tether_apndata" />
<java-symbol type="string" name="config_useragentprofile_url" />
+ <java-symbol type="string" name="config_wifi_unknown_country_code" />
<java-symbol type="string" name="config_wifi_p2p_device_type" />
<java-symbol type="string" name="contentServiceSync" />
<java-symbol type="string" name="contentServiceSyncNotificationTitle" />
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index cf1669cc5928..67307d5122c8 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -1543,8 +1543,11 @@ public class WifiStateMachine extends StateMachine {
// If it's empty, delay it in case it's a momentary dropout
int countryCodeSequence = mCountryCodeSequence.incrementAndGet();
if (TextUtils.isEmpty(countryCode)) {
+ String defaultCountryCode = mContext.getResources().getString(
+ R.string.config_wifi_unknown_country_code);
+
sendMessageDelayed(CMD_SET_COUNTRY_CODE, countryCodeSequence, persist ? 1 : 0,
- countryCode, COUNTRY_CODE_DELAY_MS);
+ defaultCountryCode, COUNTRY_CODE_DELAY_MS);
} else {
sendMessage(CMD_SET_COUNTRY_CODE, countryCodeSequence, persist ? 1 : 0, countryCode);
}