[MS68.1] Register usage callback from NetworkPolicyManagerService

Use usage callback to replace the need of intent receiver.

Test: atest TrafficStatsTest NetworkUsageStatsTest FrameworksNetTests
Bug: 204830222
Change-Id: I40967c2b6c86d25c7db93e6d3a4908b72ed76154
This commit is contained in:
junyulai
2022-01-23 03:22:13 +08:00
parent 18a2105afa
commit f6487fb3c1
2 changed files with 9 additions and 6 deletions

View File

@@ -729,7 +729,8 @@ public class NetworkStatsManager {
* {@link #unregisterUsageCallback} is called.
*
* @param template Template used to match networks. See {@link NetworkTemplate}.
* @param thresholdBytes Threshold in bytes to be notified on.
* @param thresholdBytes Threshold in bytes to be notified on. The provided value that lower
* than 2MiB will be clamped for non-privileged callers.
* @param executor The executor on which callback will be invoked. The provided {@link Executor}
* must run callback sequentially, otherwise the order of callbacks cannot be
* guaranteed.