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