summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-04-12 09:34:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-04-12 09:34:07 +0000
commite4a99c6c3d3ce34ac33c7fb63fc4202468580a91 (patch)
tree0884add557829144230e04c96329819535b4b798 /service
parent6232408a5fc660b2d8642d56747e05c15c6255b8 (diff)
parent781fa6d27f15a1e3b8cc3d3cd7aaa63b38c8d56e (diff)
Merge "Fix START_WPS null exception" into oc-dev
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.