diff options
author | Irfan Sheriff <isheriff@google.com> | 2009-12-22 21:42:17 -0800 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2010-01-08 12:04:30 -0800 |
commit | 7aac5547daf54005243c5d685cf60c5a4ff74a44 (patch) | |
tree | c5b1a1763bf1acdec678ddcfa76e2451a6d07df5 /wifi/java/android/net | |
parent | 660cc3461afbf0631cc8d4ab628628d68d840014 (diff) | |
download | frameworks_base-7aac5547daf54005243c5d685cf60c5a4ff74a44.zip frameworks_base-7aac5547daf54005243c5d685cf60c5a4ff74a44.tar.gz frameworks_base-7aac5547daf54005243c5d685cf60c5a4ff74a44.tar.bz2 |
Synchronize all WifiNative calls
Some of the native calls were left unsynchronized in the framework. Pre-empted IOCTL call
interrupted by another call from the framework cannot be handled in the driver.
Bug: 2310455
Diffstat (limited to 'wifi/java/android/net')
-rw-r--r-- | wifi/java/android/net/wifi/WifiStateTracker.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java index 9d8f730..2668fe0 100644 --- a/wifi/java/android/net/wifi/WifiStateTracker.java +++ b/wifi/java/android/net/wifi/WifiStateTracker.java @@ -616,7 +616,7 @@ public class WifiStateTracker extends NetworkStateTracker { * @return {@code true} if the operation succeeds, {@code false} otherwise, e.g., * the number of channels is invalid. */ - public boolean setNumAllowedChannels() { + public synchronized boolean setNumAllowedChannels() { try { return setNumAllowedChannels( Settings.Secure.getInt(mContext.getContentResolver(), @@ -859,7 +859,9 @@ public class WifiStateTracker extends NetworkStateTracker { // Only do this if we haven't gotten a new supplicant status since the timer // started if (mNumSupplicantStateChanges == msg.arg1) { - WifiNative.scanCommand(false); // do a passive scan + synchronized (this) { + WifiNative.scanCommand(false); // do a passive scan + } } break; @@ -1154,7 +1156,6 @@ public class WifiStateTracker extends NetworkStateTracker { // [31- 1] Reserved for future use // [ 0- 0] Interface configuration succeeded (1) or failed (0) EventLog.writeEvent(EVENTLOG_INTERFACE_CONFIGURATION_STATE_CHANGED, 0); - mHaveIpAddress = false; mWifiInfo.setIpAddress(0); mObtainingIpAddress = false; |