summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index 5da041f8b..3ea695d28 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -2605,8 +2605,12 @@ public class ClientModeImpl extends StateMachine {
// SSID might have been updated, so call updateCapabilities
updateCapabilities();
- final WifiConfiguration config = getCurrentWifiConfiguration();
- if (config != null) {
+ WifiConfiguration config = getCurrentWifiConfiguration();
+ if (config == null) {
+ // If not connected, this should be non-null.
+ config = getTargetWifiConfiguration();
+ }
+ if (config != null && config.networkId == mWifiInfo.getNetworkId()) {
mWifiInfo.setEphemeral(config.ephemeral);
mWifiInfo.setTrusted(config.trusted);
mWifiInfo.setOsuAp(config.osu);