Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9feca638 authored by Quang Luong's avatar Quang Luong
Browse files

Handled exeption in forget() for removePasspointConfiguration()

Added a catch for the call to removePasspointConfiguration().

Bug: 70393078
Test: atest WifiSettingsTest
Change-Id: If0213006f3fe42c50657bc2dde89a8dce4cff2b6
parent c2d7bb79
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1116,7 +1116,12 @@ public class WifiSettings extends RestrictedSettingsFragment
                return;
            }
        } else if (mSelectedAccessPoint.getConfig().isPasspoint()) {
            try {
                mWifiManager.removePasspointConfiguration(mSelectedAccessPoint.getConfig().FQDN);
            } catch (IllegalArgumentException e) {
                Log.e(TAG, "Failed to remove Passpoint configuration with error: " + e);
                return;
            }
        } else {
            mWifiManager.forget(mSelectedAccessPoint.getConfig().networkId, mForgetListener);
        }