summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David Su <dysu@google.com> 2021-02-24 02:18:16 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-02-24 02:18:16 +0000
commitf95add02ad99940d38dbf22388cc8c2340a8eeaf (patch)
tree71ac0574a75d989829a5b0b3bffbeb849aeb48fd
parent125b28bb727cb00157244ce7ec2b6ab5d9e14fd6 (diff)
parent17761758889599d4550ce276816be9aaa41dc2a7 (diff)
Merge "ActiveModeWarden: Only call setMultiStaPrimaryConnection if a primary exists" into sc-dev
-rw-r--r--service/java/com/android/server/wifi/ActiveModeWarden.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/ActiveModeWarden.java b/service/java/com/android/server/wifi/ActiveModeWarden.java
index 8607ca2ecd..a5e1a6609e 100644
--- a/service/java/com/android/server/wifi/ActiveModeWarden.java
+++ b/service/java/com/android/server/wifi/ActiveModeWarden.java
@@ -1188,8 +1188,13 @@ public class ActiveModeWarden {
} else if (clientRole == ROLE_CLIENT_SECONDARY_TRANSIENT) {
mWifiNative.setMultiStaUseCase(WifiNative.DUAL_STA_TRANSIENT_PREFER_PRIMARY);
}
- mWifiNative.setMultiStaPrimaryConnection(
- getPrimaryClientModeManager().getInterfaceName());
+ String primaryIfaceName = getPrimaryClientModeManager().getInterfaceName();
+ // if no primary exists (occurs briefly during Make Before Break), don't update the
+ // primary and keep the previous primary. Only update WifiNative when the new primary is
+ // activated.
+ if (primaryIfaceName != null) {
+ mWifiNative.setMultiStaPrimaryConnection(primaryIfaceName);
+ }
}
private void onStartedOrRoleChanged(ConcreteClientModeManager clientModeManager) {