summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
index ae75a370e..c1d9445b0 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
@@ -1359,8 +1359,20 @@ public class WifiP2pServiceImpl extends IWifiP2pManager.Stub {
WifiP2pDevice owner = group.getOwner();
if (owner == null) {
- loge("Ignored invitation from null owner");
- break;
+ int id = group.getNetworkId();
+ if (id < 0) {
+ loge("Ignored invitation from null owner");
+ break;
+ }
+
+ String addr = mGroups.getOwnerAddr(id);
+ if (addr != null) {
+ group.setOwner(new WifiP2pDevice(addr));
+ owner = group.getOwner();
+ } else {
+ loge("Ignored invitation from null owner");
+ break;
+ }
}
config = new WifiP2pConfig();