OSDN Git Service

wifi: catch UnsupportedOperationException for getMatchingWifiConfig
authorPeter Qiu <zqiu@google.com>
Mon, 27 Mar 2017 20:45:25 +0000 (13:45 -0700)
committerPeter Qiu <zqiu@google.com>
Mon, 27 Mar 2017 20:55:34 +0000 (13:55 -0700)
commit0ffb89d1d1ebcd6388ee99652beaedd4c11ea3d4
treeef9ad33cd6d9a074f3b182f70d9dcec182ee3eed
parentc75dbe9d9c4bee1ea526deaeb33ad493dc4e3e9e
wifi: catch UnsupportedOperationException for getMatchingWifiConfig

On a device without Passpoint support, an UnsupportedOperationException
will be thrown when invoking WifiManager#getMatchingWifiConfig.
So catch it to avoid crash.

Bug: 36649203
Test: manually set config_wifi_hotspot2_enabled to false and verify
      Settings app doesn't crash

Change-Id: I69f37897449033da9d21edda9953ad2738f7e314
packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java