summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2012-10-17 12:48:38 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-17 12:48:39 -0700
commit90a80bb8aece5b1f589020d512a9e1695e2fd1d8 (patch)
treecefe26e344cae5a1b9305a149ccf2a6540f23bd9 /wifi
parent64e5aa73c549e006a0e6ce1030c88206c781dc1a (diff)
parentedba852930bd2e9ab41f74f340595dafe500c756 (diff)
downloadframeworks_base-90a80bb8aece5b1f589020d512a9e1695e2fd1d8.zip
frameworks_base-90a80bb8aece5b1f589020d512a9e1695e2fd1d8.tar.gz
frameworks_base-90a80bb8aece5b1f589020d512a9e1695e2fd1d8.tar.bz2
Merge "Handle null BSSID" into jb-mr1-dev
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiWatchdogStateMachine.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
index 9c727f9..c8f0712 100644
--- a/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiWatchdogStateMachine.java
@@ -556,8 +556,8 @@ public class WifiWatchdogStateMachine extends StateMachine {
mLinkProperties = (LinkProperties) intent.getParcelableExtra(
WifiManager.EXTRA_LINK_PROPERTIES);
if (mPoorNetworkDetectionEnabled) {
- if (mWifiInfo == null) {
- if (DBG) logd("Ignoring link verification, mWifiInfo is NULL");
+ if (mWifiInfo == null || mCurrentBssid == null) {
+ loge("Ignore, wifiinfo " + mWifiInfo +" bssid " + mCurrentBssid);
sendLinkStatusNotification(true);
} else {
transitionTo(mVerifyingLinkState);
@@ -726,7 +726,7 @@ public class WifiWatchdogStateMachine extends StateMachine {
}
private void handleRssiChange() {
- if (mCurrentSignalLevel <= LINK_MONITOR_LEVEL_THRESHOLD) {
+ if (mCurrentSignalLevel <= LINK_MONITOR_LEVEL_THRESHOLD && mCurrentBssid != null) {
transitionTo(mLinkMonitoringState);
} else {
// stay here
@@ -920,11 +920,15 @@ public class WifiWatchdogStateMachine extends StateMachine {
if (DBG) logd("########################################");
if (isGood) {
mWsmChannel.sendMessage(GOOD_LINK_DETECTED);
- mCurrentBssid.mLastTimeGood = SystemClock.elapsedRealtime();
- logd("Good link notification is sent");
+ if (mCurrentBssid != null) {
+ mCurrentBssid.mLastTimeGood = SystemClock.elapsedRealtime();
+ }
+ if (DBG) logd("Good link notification is sent");
} else {
mWsmChannel.sendMessage(POOR_LINK_DETECTED);
- mCurrentBssid.mLastTimePoor = SystemClock.elapsedRealtime();
+ if (mCurrentBssid != null) {
+ mCurrentBssid.mLastTimePoor = SystemClock.elapsedRealtime();
+ }
logd("Poor link notification is sent");
}
}