summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-02-14 16:26:15 -0800
committerRoshan Pius <rpius@google.com>2017-02-15 16:38:38 -0800
commitc626bc21f7ebac14daa31ca7014767970127efee (patch)
tree7ba6bcb576deca55862dbed84df48175e23dfff4 /service
parentef027b4240eb994976dc6173fa396fe10b45ae52 (diff)
WifiMonitor: Methods to broadcast remaining Wps events
Bug: 35357251 Test: Unit tests Change-Id: I27a3fb384dbb37fa6d1b8a4fd30f43be76e4e9aa
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiMonitor.java33
1 files changed, 30 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiMonitor.java b/service/java/com/android/server/wifi/WifiMonitor.java
index cc9ce9c0b..3f52c59d1 100644
--- a/service/java/com/android/server/wifi/WifiMonitor.java
+++ b/service/java/com/android/server/wifi/WifiMonitor.java
@@ -828,13 +828,13 @@ public class WifiMonitor {
if (!eventStr.startsWith(EVENT_PREFIX_STR)) {
if (eventStr.startsWith(WPS_SUCCESS_STR)) {
- sendMessage(iface, WPS_SUCCESS_EVENT);
+ broadcastWpsSuccessEvent(iface);
} else if (eventStr.startsWith(WPS_FAIL_STR)) {
handleWpsFailEvent(eventStr, iface);
} else if (eventStr.startsWith(WPS_OVERLAP_STR)) {
- sendMessage(iface, WPS_OVERLAP_EVENT);
+ broadcastWpsOverlapEvent(iface);
} else if (eventStr.startsWith(WPS_TIMEOUT_STR)) {
- sendMessage(iface, WPS_TIMEOUT_EVENT);
+ broadcastWpsTimeoutEvent(iface);
} else if (eventStr.startsWith(P2P_EVENT_PREFIX_STR)) {
handleP2pEvents(eventStr, iface);
} else if (eventStr.startsWith(HOST_AP_EVENT_PREFIX_STR)) {
@@ -1498,4 +1498,31 @@ public class WifiMonitor {
//For all other errors, return a generic internal error
sendMessage(iface, WPS_FAIL_EVENT, WifiManager.ERROR, reason);
}
+
+ /**
+ * Broadcast the WPS succes event to all the handlers registered for this event.
+ *
+ * @param iface Name of iface on which this occurred.
+ */
+ public void broadcastWpsSuccessEvent(String iface) {
+ sendMessage(iface, WPS_SUCCESS_EVENT);
+ }
+
+ /**
+ * Broadcast the WPS overlap event to all the handlers registered for this event.
+ *
+ * @param iface Name of iface on which this occurred.
+ */
+ public void broadcastWpsOverlapEvent(String iface) {
+ sendMessage(iface, WPS_OVERLAP_EVENT);
+ }
+
+ /**
+ * Broadcast the WPS timeout event to all the handlers registered for this event.
+ *
+ * @param iface Name of iface on which this occurred.
+ */
+ public void broadcastWpsTimeoutEvent(String iface) {
+ sendMessage(iface, WPS_TIMEOUT_EVENT);
+ }
}