am 1b3dcd3b: Merge "Fix NPE while creating autonomous GO" into jb-dev

* commit '1b3dcd3bda605d766da64b48b22bb96a875e728a':
  Fix NPE while creating autonomous GO
This commit is contained in:
Irfan Sheriff
2012-06-01 19:01:28 -07:00
committed by Android Git Automerger

View File

@@ -897,7 +897,11 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
break;
case WifiMonitor.P2P_DEVICE_LOST_EVENT:
WifiP2pDevice device = (WifiP2pDevice) message.obj;
if (!mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) {
// If we lose a device during an autonomous group creation,
// mSavedPeerConfig can be empty
if (mSavedPeerConfig != null &&
!mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) {
// Do the regular device lost handling
ret = NOT_HANDLED;
break;