diff options
author | Rebecca Silberstein <silberst@google.com> | 2017-03-23 18:39:05 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-23 18:39:05 +0000 |
commit | fb30401ec20fa2f82c1ae9d37efc367630bb2995 (patch) | |
tree | 66629edc940a7ec1f5929a40335ce973f6c4ecd0 /service | |
parent | 9fe2d67c7529c922f71d6dbc2e10fc65d141a11c (diff) | |
parent | 4e0a1bafa7a86e2840c855846f3fdaee9cd00424 (diff) |
Merge "SoftApManager: retrieve config when null"
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); } /** |