summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorGlen Kuhne <kuh@google.com>2017-04-12 09:44:21 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-04-12 09:44:21 +0000
commit997a8743cd5be5812ec176fe15c5fa0fa0d55495 (patch)
tree2216b794912df2bd4d269dd017e6120e0128637d /service
parent6181fc1dcf53be40b6ad5ae56cad8df71ed53b68 (diff)
parentdc22e5f22e051f1ec42af53011c22516555d2844 (diff)
Merge "Fix START_WPS null exception" into oc-dev am: e4a99c6c3d
am: dc22e5f22e Change-Id: Ia2446a9efbfbd79c17dd0e66d1a1a8202e1109d2
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 8f62288c8..048c86007 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -5111,6 +5111,11 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss
break;
case WifiManager.START_WPS:
WpsInfo wpsInfo = (WpsInfo) message.obj;
+ if (wpsInfo == null) {
+ loge("Cannot start WPS with null WpsInfo object");
+ replyToMessage(message, WifiManager.WPS_FAILED, WifiManager.ERROR);
+ break;
+ }
WpsResult wpsResult = new WpsResult();
// TODO(b/32898136): Not needed when we start deleting networks from supplicant
// on disconnect.