Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f8e3f2b authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android Git Automerger
Browse files

am bf310d1f: Merge "Fix issues shown on CTS tests" into jb-mr1-dev

* commit 'bf310d1f':
  Fix issues shown on CTS tests
parents 32a1c5f7 bf310d1f
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -1079,6 +1079,20 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
                       // remain at this state.
                   }
                   break;
                case WifiMonitor.P2P_GROUP_STARTED_EVENT:
                   mGroup = (WifiP2pGroup) message.obj;
                   if (DBG) logd(getName() + " group started");

                    // We hit this scenario when a persistent group is reinvoked
                   if (mGroup.getNetworkId() == WifiP2pGroup.PERSISTENT_NET_ID) {
                       mAutonomousGroup = false;
                       deferMessage(message);
                       transitionTo(mGroupNegotiationState);
                   } else {
                       loge("Unexpected group creation, remove " + mGroup);
                       mWifiNative.p2pGroupRemove(mGroup.getInterface());
                   }
                   break;
                default:
                   return NOT_HANDLED;
            }
@@ -2338,6 +2352,10 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
        }
        NetworkUtils.resetConnections(mGroup.getInterface(), NetworkUtils.RESET_ALL_ADDRESSES);

        // Clear any timeout that was set. This is essential for devices
        // that reuse the main p2p interface for a created group.
        mWifiNative.setP2pGroupIdle(mGroup.getInterface(), 0);

        mGroup = null;
        mWifiNative.p2pFlush();
        if (mPeers.remove(mPeersLostDuringConnection)) sendP2pPeersChangedBroadcast();