diff options
author | Rebecca Silberstein <silberst@google.com> | 2017-03-09 15:04:08 -0800 |
---|---|---|
committer | Rebecca Silberstein <silberst@google.com> | 2017-03-15 13:41:22 -0700 |
commit | 4e0a1bafa7a86e2840c855846f3fdaee9cd00424 (patch) | |
tree | ae8603744a7401290c26ace73bce6ed286c962cf /service | |
parent | ffe8694d14621b679ef06ca2679cf55462b33ea8 (diff) |
SoftApManager: retrieve config when null
To support temporary softap configs, SoftApManager will not
automatically write out passed in configs to the WifiApConfigStore.
This means that Settings will need to continue explicitly saving config
changes through the WifiManager API and cannot depend on a call to start
softap to write a new config.
Bug: 35809698
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: Wifi integration tests
Change-Id: I60e138ada3258e29ed4f411616e85b553c7dd34d
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/SoftApManager.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/service/java/com/android/server/wifi/SoftApManager.java b/service/java/com/android/server/wifi/SoftApManager.java index c8a15cf36..64f4a1494 100644 --- a/service/java/com/android/server/wifi/SoftApManager.java +++ b/service/java/com/android/server/wifi/SoftApManager.java @@ -61,6 +61,8 @@ public class SoftApManager implements ActiveModeManager { private final WifiMetrics mWifiMetrics; + private WifiConfiguration mApConfig; + /** * Listener for soft AP state changes. */ @@ -90,18 +92,19 @@ public class SoftApManager implements ActiveModeManager { mApInterface = apInterface; mNwService = nms; mWifiApConfigStore = wifiApConfigStore; - if (config != null) { - mWifiApConfigStore.setApConfiguration(config); + if (config == null) { + mApConfig = mWifiApConfigStore.getApConfiguration(); + } else { + mApConfig = config; } mWifiMetrics = wifiMetrics; } /** - * Start soft AP with the current saved config. + * Start soft AP with the supplied config. */ public void start() { - mStateMachine.sendMessage(SoftApStateMachine.CMD_START, - mWifiApConfigStore.getApConfiguration()); + mStateMachine.sendMessage(SoftApStateMachine.CMD_START, mApConfig); } /** |