Add null check on getting p2p iface name
After tearing down client interface, p2p interface will be invalid and
null is returned when getting p2p interface name. When Wifi on/off is
quickly repeated, a crash happens due to NullPointerException because
WifiP2pNative#teardownInterface is called and trying to get p2p
interface name at that time while p2p iface is marked as invalid
(client mode is shutting down). This patch adds null check on getting
p2p iface name to avoid crash.
This is similar to the fix of b/80095183.
Bug: 128271344
Test: Manually verified the crash scenario
Signed-off-by: Daichi Ueura <daichi.ueura@sony.com>
Change-Id: I1fc02feeef94ac0b18fa8fd559de051c0ca56fc0
1 file changed