Merge "wifi: catch UnsupportedOperationException for getMatchingWifiConfig" am: ae3bae715e

am: 78eeb9b090

Change-Id: Icf369fc41387dbd1ed854434f2d77ecd867c4532
This commit is contained in:
Peter Qiu
2017-03-27 21:33:46 +00:00
committed by android-build-merger

View File

@@ -394,9 +394,13 @@ public class WifiTracker {
// the given ScanResult. This is used for showing that a given AP // the given ScanResult. This is used for showing that a given AP
// (ScanResult) is available via a Passpoint provider (provider friendly // (ScanResult) is available via a Passpoint provider (provider friendly
// name). // name).
WifiConfiguration config = mWifiManager.getMatchingWifiConfig(result); try {
if (config != null) { WifiConfiguration config = mWifiManager.getMatchingWifiConfig(result);
accessPoint.update(config); if (config != null) {
accessPoint.update(config);
}
} catch (UnsupportedOperationException e) {
// Passpoint not supported on the device.
} }
} }