Replace the hidden getActiveLinkProperties usage

It's a refactor work to remove the hidden connectivity method
usages outside the incoming connectivity module.

CM#getActiveLinkProperties is hidden and no longer supported
outside the module. Caller should replace it with
CM#getLinkProperties(Network), so replace the usage as it is.

Bug: 172183305
Test: m
Change-Id: I20bcc9da97113da352e43a87d029596c9729cad8
This commit is contained in:
Chiachang Wang
2021-03-15 15:52:22 +08:00
parent e9dff191b0
commit fd1fa9c0a8

View File

@@ -126,7 +126,7 @@ public class AdbIpAddressPreferenceController extends AbstractConnectivityPrefer
* @return the formatted and newline-separated IP addresses, or null if none.
*/
private static String getDefaultIpAddresses(ConnectivityManager cm) {
LinkProperties prop = cm.getActiveLinkProperties();
LinkProperties prop = cm.getLinkProperties(cm.getActiveNetwork());
return formatIpAddresses(prop);
}