Merge "Fix Wifi state not updated while connecting" into rvc-dev am: a8e808221e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11803411

Change-Id: If3e540bcfd6c35545d4dbdf7d67960f5b97f933f
This commit is contained in:
TreeHugger Robot
2020-06-09 21:35:45 +00:00
committed by Automerger Merge Worker

View File

@@ -900,9 +900,7 @@ public class WifiTracker implements LifecycleObserver, OnStart, OnStop, OnDestro
updateNetworkInfo(info); updateNetworkInfo(info);
fetchScansAndConfigsAndUpdateAccessPoints(); fetchScansAndConfigsAndUpdateAccessPoints();
} else if (WifiManager.RSSI_CHANGED_ACTION.equals(action)) { } else if (WifiManager.RSSI_CHANGED_ACTION.equals(action)) {
NetworkInfo info = updateNetworkInfo(/* networkInfo= */ null);
mConnectivityManager.getNetworkInfo(mWifiManager.getCurrentNetwork());
updateNetworkInfo(info);
} }
} }
}; };
@@ -948,7 +946,7 @@ public class WifiTracker implements LifecycleObserver, OnStart, OnStop, OnDestro
// We don't send a NetworkInfo object along with this message, because even if we // We don't send a NetworkInfo object along with this message, because even if we
// fetch one from ConnectivityManager, it might be older than the most recent // fetch one from ConnectivityManager, it might be older than the most recent
// NetworkInfo message we got via a WIFI_STATE_CHANGED broadcast. // NetworkInfo message we got via a WIFI_STATE_CHANGED broadcast.
updateNetworkInfo(null); updateNetworkInfo(/* networkInfo= */ null);
} }
} }
} }