From 8b033d37cac86ad4961891d760ca883e8bd0ef97 Mon Sep 17 00:00:00 2001 From: Yuhao Zheng Date: Wed, 9 Oct 2013 11:53:51 -0700 Subject: Add a missing wifi p2p discovery changed broadcast When we disable wifi while wifi p2p peer searching is in progress, we don't get a WIFI_P2P_DISCOVERY_CHANGED_ACTION broadcast saying that discovery is stopped. Since this broadcast is sticky, applications will still get the previous one saying discovery is started even if wifi p2p has been disabled. Adding a sendP2pDiscoveryChangedBroadcast when exiting P2pEnabledState fixes this problem, and it won't be a duplicate as sendP2pDiscoveryChangedBroadcast checks for that. Bug: 11151666 Change-Id: I62de8f3d17d80f151403b91cf5c62866d931c01b --- wifi/java/android/net/wifi/p2p/WifiP2pService.java | 1 + 1 file changed, 1 insertion(+) (limited to 'wifi/java/android/net') diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pService.java b/wifi/java/android/net/wifi/p2p/WifiP2pService.java index 625ffb8..23058f4 100644 --- a/wifi/java/android/net/wifi/p2p/WifiP2pService.java +++ b/wifi/java/android/net/wifi/p2p/WifiP2pService.java @@ -1080,6 +1080,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub { @Override public void exit() { + sendP2pDiscoveryChangedBroadcast(false); sendP2pStateChangedBroadcast(false); mNetworkInfo.setIsAvailable(false); } -- cgit v1.1