Fix an NPE that can result from a race condition.

NetworkInfo and WifiInfo are set via broadcast receiver so while in a
true stable state network info should not be null if wifi info is, this
can occur in rare instances due to a race condition. It is convention in
AccessPoint.java to always null check network info.

Bug: b/37951301
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: Ia1b357c84b961a555ec24a5b930ade35ddf8dbba
(cherry picked from commit 5c5cd7aa2b0c538db890177b8fca31a197b5d400)
2 files changed