wifi: cache HAL object to avoid NPE due to race condition

When supplicant is restarted, there might be race condition between
null check and API executation.
Caching HAL objects to avoid NPE and trigger remote exception correctly.

Bug: 176306613
Test: atest FrameworksWifiTests
Change-Id: I45492a4cde2a761e6ef0dde7b328da6c0e2b7e0a
1 file changed