p2p: fix the copy constructor of WifiP2pDevice

Fix the copy constructor of WifiP2pDevice will return a new
object with an allocated wfdInfo object when the wfdInfo of
the source object is null.

Bug: 123165189
Test: build
Test: atest frameworks/base/wifi/tests/
Change-Id: I63f93d2662d2f54e186202ff383990fcd16c7ca4
2 files changed