Hold wifi and mobile interfaces since boot in NetworkStatsService am: a2f1cf3576

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/18710006

Change-Id: Ie53afd7a2c6cfdd46a1ed3954a1aceac9bd120eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Aaron Huang
2022-06-03 09:25:50 +00:00
committed by Automerger Merge Worker
3 changed files with 70 additions and 15 deletions

View File

@@ -1299,6 +1299,17 @@ public final class NetworkStats implements Parcelable, Iterable<NetworkStats.Ent
return ret;
}
/**
* Removes the interface name from all entries.
* This mutates the original structure in place.
* @hide
*/
public void clearInterfaces() {
for (int i = 0; i < size; i++) {
iface[i] = null;
}
}
/**
* Only keep entries that match all specified filters.
*