p2p: Integrate check and get methods for P2pIfaceV1_2

Currently, SupplicantP2pIfaceHal first checks if P2pIfaceV1_2
is available, then gets and uses P2pIfaceV1_2 directly without
doing null check. The split of check and get operations causes
NullPointerException in some very corner cases where p2p
interface is unregistered in between.

This change integrates both methods to fix the issue above.

Bug: 147336152
Test: atest FrameworksWifiTests
Change-Id: I89d3b47e189793d443facb3c2632d847e3cf7933
1 file changed