Merge changes I713bc2ec,Ib9ab07c9 am: 6fe4b878e5 am: db887739f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1537264 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I31e71444d5b40981058b5a4152e5f1a0521527d0
This commit is contained in:
@@ -194,15 +194,17 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
|
||||
subscriberId = state.subscriberId;
|
||||
|
||||
if (type == TYPE_WIFI) {
|
||||
if (state.networkId != null) {
|
||||
networkId = state.networkId;
|
||||
} else {
|
||||
if (state.networkCapabilities.getSsid() != null) {
|
||||
networkId = state.networkCapabilities.getSsid();
|
||||
if (networkId == null) {
|
||||
// TODO: Figure out if this code path never runs. If so, remove them.
|
||||
final WifiManager wifi = (WifiManager) context.getSystemService(
|
||||
Context.WIFI_SERVICE);
|
||||
final WifiInfo info = wifi.getConnectionInfo();
|
||||
networkId = info != null ? info.getSSID() : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new NetworkIdentity(type, subType, subscriberId, networkId, roaming, metered,
|
||||
defaultNetwork);
|
||||
|
||||
Reference in New Issue
Block a user