Rename *Iface* APIs to *Interface*

Address API review feedback, other APIs have been refering to
these as "interface" instead of "iface" so migrate the APIs named
*Iface* to *Interface*.

Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Change-Id: I38b476e762fb57fa88c4a789092d0af6f5330d80
This commit is contained in:
Aaron Huang
2021-04-28 17:21:21 +08:00
parent 534a4ac6da
commit 4ddc7c782f
2 changed files with 6 additions and 6 deletions

View File

@@ -71,13 +71,13 @@ public final class UnderlyingNetworkInfo implements Parcelable {
/** Get the interface name of this network. */
@NonNull
public String getIface() {
public String getInterface() {
return mIface;
}
/** Get the names of the interfaces underlying this network. */
@NonNull
public List<String> getUnderlyingIfaces() {
public List<String> getUnderlyingInterfaces() {
return mUnderlyingIfaces;
}
@@ -124,8 +124,8 @@ public final class UnderlyingNetworkInfo implements Parcelable {
if (!(o instanceof UnderlyingNetworkInfo)) return false;
final UnderlyingNetworkInfo that = (UnderlyingNetworkInfo) o;
return mOwnerUid == that.getOwnerUid()
&& Objects.equals(mIface, that.getIface())
&& Objects.equals(mUnderlyingIfaces, that.getUnderlyingIfaces());
&& Objects.equals(mIface, that.getInterface())
&& Objects.equals(mUnderlyingIfaces, that.getUnderlyingInterfaces());
}
@Override

View File

@@ -382,8 +382,8 @@ public class NetworkStatsFactory {
// Migrate data usage over a VPN to the TUN network.
for (UnderlyingNetworkInfo info : vpnArray) {
delta.migrateTun(info.getOwnerUid(), info.getIface(),
info.getUnderlyingIfaces());
delta.migrateTun(info.getOwnerUid(), info.getInterface(),
info.getUnderlyingInterfaces());
// Filter out debug entries as that may lead to over counting.
delta.filterDebugEntries();
}