Permalink
Browse files

Fix NPE in SettingsLib

While trying to execute getScanResults(), it throws a NullPointException

CRs-Fixed:  954617

Change-Id: Ifc46288abd4b08836c2bcb1d45a33606a1891e63
  • Loading branch information...
c_yongga authored and xlxfoxxlx committed Jan 16, 2016
1 parent 54ddf0a commit 128ef13f1e16c0ef8085022879233c3c45b0fc42
Showing with 3 additions and 0 deletions.
  1. +3 −0 packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
@@ -276,6 +276,9 @@ private void handleResume() {
private Collection<ScanResult> fetchScanResults() {
mScanId++;
final List<ScanResult> newResults = mWifiManager.getScanResults();
if (newResults == null) {
return null;
}
for (ScanResult newResult : newResults) {
if (newResult.SSID == null || newResult.SSID.isEmpty()) {
continue;

0 comments on commit 128ef13

Please sign in to comment.