Make Wifi more resilient to services starting late

Fix crash caused by WifiScanningService starting late
by checking mScanningEnabled flag before calling
WifiScanner APIs.

Fix NPE in RTT service isAvailable() caused by RTT
service starting late. Now if mRttNative is null we
return unavailable

Bug: 140938772
Bug: 141624112
Test: atest FrameworksWifiTests
Test: reboot device and check logs for errors
Change-Id: I197bedf492d0b73018e5bb386bf1efa6dd494f60
3 files changed
tree: 15be3612ab2ffa363a1cb646dad5041a304e225f
  1. service/
  2. PREUPLOAD.cfg