Add getters to UnderlyingNetworkInfo
Address API review feedback, add getters to UnderlyingNetworkInfo instead of exposing fields. Instead of wasting memory by converting this into an array, have migrateTun take a List<String>. In turn, tunAdjustmentInit should also take a List<String>. (cherry picked from ag/14211075) Bug: 183972554 Test: atest android.net.UnderlyingNetworkInfoTest Merged-In: Id59744097208d91298a25ef110ade91a9cf291a1 Change-Id: Id59744097208d91298a25ef110ade91a9cf291a1
This commit is contained in:
@@ -382,8 +382,8 @@ public class NetworkStatsFactory {
|
||||
|
||||
// Migrate data usage over a VPN to the TUN network.
|
||||
for (UnderlyingNetworkInfo info : vpnArray) {
|
||||
delta.migrateTun(info.ownerUid, info.iface,
|
||||
info.underlyingIfaces.toArray(new String[0]));
|
||||
delta.migrateTun(info.getOwnerUid(), info.getIface(),
|
||||
info.getUnderlyingIfaces());
|
||||
// Filter out debug entries as that may lead to over counting.
|
||||
delta.filterDebugEntries();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user