diff options
author | Rebecca Silberstein <silberst@google.com> | 2018-05-11 20:31:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-05-11 20:31:53 +0000 |
commit | ac532d206250b85a6a605ded31d5b1439d829112 (patch) | |
tree | 2a8021039de80c9e80b77034e432d4d38c2a8c7f /service | |
parent | f9f970b1fa45d917adb3ff7bac12cf1c1e06bb8f (diff) | |
parent | ab00689b004ddb2594492d50406fb61a3f1bf8b9 (diff) |
Merge "WifiServiceImpl: stop softap when ip config fails" into pi-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index eb1746e87..c2913ea73 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -966,10 +966,17 @@ public class WifiServiceImpl extends IWifiManager.Stub { LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE); break; case WifiManager.IFACE_IP_MODE_CONFIGURATION_ERROR: - // there was an error setting up the hotspot... trigger onFailed for the - // registered LOHS requestors - sendHotspotFailedMessageToAllLOHSRequestInfoEntriesLocked( - LocalOnlyHotspotCallback.ERROR_GENERIC); + Slog.d(TAG, "IP mode config error - need to clean up"); + if (mLocalOnlyHotspotRequests.isEmpty()) { + Slog.d(TAG, "no LOHS requests, stop softap"); + stopSoftAp(); + } else { + Slog.d(TAG, "we have LOHS requests, clean them up"); + // there was an error setting up the hotspot... trigger onFailed for the + // registered LOHS requestors + sendHotspotFailedMessageToAllLOHSRequestInfoEntriesLocked( + LocalOnlyHotspotCallback.ERROR_GENERIC); + } updateInterfaceIpStateInternal(null, WifiManager.IFACE_IP_MODE_UNSPECIFIED); break; case WifiManager.IFACE_IP_MODE_UNSPECIFIED: |