diff options
author | Rebecca Silberstein <silberst@google.com> | 2018-05-08 18:22:52 -0700 |
---|---|---|
committer | Rebecca Silberstein <silberst@google.com> | 2018-05-08 18:22:52 -0700 |
commit | fdd8945c3952dd368918e24c84028f19092fc663 (patch) | |
tree | 6ec3261c848752051f150db02b88983c6510ff89 /service | |
parent | 43b4bb291800401b67daf50156f8d04c64569c21 (diff) |
SoftApManager: no teardown when iface destroyed
When softap mode shuts down due to the iface being destroyed, no need to
explicitly call to teardown the iface.
Bug: 79441131
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually toggled wifi and tethering to verify client mode came up
Change-Id: I03a75b4569d4e86fd01a1ec0e144865a789a2bc9
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/SoftApManager.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/SoftApManager.java b/service/java/com/android/server/wifi/SoftApManager.java index a23d046e3..1716015a2 100644 --- a/service/java/com/android/server/wifi/SoftApManager.java +++ b/service/java/com/android/server/wifi/SoftApManager.java @@ -456,10 +456,9 @@ public class SoftApManager implements ActiveModeManager { @Override public void exit() { - if (mApInterfaceName == null) { - return; + if (mApInterfaceName != null) { + stopSoftAp(); } - stopSoftAp(); if (mSettingObserver != null) { mSettingObserver.unregister(); } @@ -531,6 +530,7 @@ public class SoftApManager implements ActiveModeManager { Log.d(TAG, "Interface was cleanly destroyed."); updateApState(WifiManager.WIFI_AP_STATE_DISABLING, WifiManager.WIFI_AP_STATE_ENABLED, 0); + mApInterfaceName = null; transitionTo(mIdleState); break; case CMD_INTERFACE_DOWN: |