summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-04-24 04:54:16 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-04-24 04:54:16 +0000
commitb896d7a764097b750caff664a62514dfd4560511 (patch)
treec924d00aef914796ac5c77bf0b420e22f316ca11 /service
parentc95db3a37fbb45c108314e327035d55d5b224429 (diff)
parentadb1e3f0bb2cf8c349bc71b577e5c758bbc89851 (diff)
Merge "p2p: broadcast p2p state change on interface destroy" into rvc-dev am: 67fbe2bf56 am: adb1e3f0bb
Change-Id: I4d7c1b25b570265867375af70eb9137472d9219a
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
index 00c58aa78..b65ac643a 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
@@ -858,9 +858,6 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
// Register for interface availability from HalDeviceManager
mWifiNative.registerInterfaceAvailableListener((boolean isAvailable) -> {
mIsHalInterfaceAvailable = isAvailable;
- if (isAvailable) {
- checkAndReEnableP2p();
- }
checkAndSendP2pStateChangedBroadcast();
}, getHandler());
@@ -1390,7 +1387,9 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
break;
}
mInterfaceName = mWifiNative.setupInterface((String ifaceName) -> {
+ mIsHalInterfaceAvailable = false;
sendMessage(DISABLE_P2P);
+ checkAndSendP2pStateChangedBroadcast();
}, getHandler());
if (mInterfaceName == null) {
Log.e(TAG, "Failed to setup interface for P2P");