summaryrefslogtreecommitdiffstats
path: root/wifi/java
diff options
context:
space:
mode:
authorVinit Deshapnde <vinitd@google.com>2014-04-17 21:57:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-17 21:57:12 +0000
commit2585e15ef722c7bd8c320e57ded8ad67da121245 (patch)
treeaa8235c711ea912fc8473ded7d0a90fb61db35d3 /wifi/java
parent8e1e40066bae030d6a6e8f3f3f8f69ccd6ec1848 (diff)
parent72358802d6135c633dd158f44b988e4f4075e6fd (diff)
downloadframeworks_base-2585e15ef722c7bd8c320e57ded8ad67da121245.zip
frameworks_base-2585e15ef722c7bd8c320e57ded8ad67da121245.tar.gz
frameworks_base-2585e15ef722c7bd8c320e57ded8ad67da121245.tar.bz2
am 72358802: am 45e74676: Merge "Don\'t reset country code once it is persisted" into klp-dev
* commit '72358802d6135c633dd158f44b988e4f4075e6fd': Don't reset country code once it is persisted
Diffstat (limited to 'wifi/java')
-rw-r--r--wifi/java/android/net/wifi/WifiStateMachine.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 0fffd37..1dc7da8 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -233,8 +233,6 @@ public class WifiStateMachine extends StateMachine {
private DhcpStateMachine mDhcpStateMachine;
private boolean mDhcpActive = false;
- // Delay in switching to null country code (non-null has no delay)
- private final int COUNTRY_CODE_DELAY_MS = 15000;
private final AtomicInteger mCountryCodeSequence = new AtomicInteger();
private class InterfaceObserver extends BaseNetworkObserver {
@@ -1539,15 +1537,13 @@ public class WifiStateMachine extends StateMachine {
* @param persist {@code true} if the setting should be remembered.
*/
public void setCountryCode(String countryCode, boolean persist) {
- // If it's a country code, apply immediately,
- // If it's empty, delay it in case it's a momentary dropout
+ // If it's a good country code, apply after the current
+ // wifi connection is terminated; ignore resetting of code
+ // for now (it is unclear what the chipset should do when
+ // country code is reset)
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,
- defaultCountryCode, COUNTRY_CODE_DELAY_MS);
+ log("Ignoring resetting of country code");
} else {
sendMessage(CMD_SET_COUNTRY_CODE, countryCodeSequence, persist ? 1 : 0, countryCode);
}
@@ -1662,6 +1658,8 @@ public class WifiStateMachine extends StateMachine {
pw.println("mSuspendOptNeedsDisabled " + mSuspendOptNeedsDisabled);
pw.println("Supplicant status " + mWifiNative.status());
pw.println("mEnableBackgroundScan " + mEnableBackgroundScan);
+ pw.println("mLastSetCountryCode " + mLastSetCountryCode);
+ pw.println("mPersistedCountryCode " + mPersistedCountryCode);
pw.println();
mWifiConfigStore.dump(fd, pw, args);
}
@@ -3680,6 +3678,9 @@ public class WifiStateMachine extends StateMachine {
deferMessage(message);
}
break;
+ case CMD_SET_COUNTRY_CODE:
+ deferMessage(message);
+ break;
case CMD_START_SCAN:
/* Do not attempt to connect when we are already connected */
noteScanStart(message.arg1, (WorkSource) message.obj);