[SP29] Send interface warning bytes to NetworkStatsProvider
This change contains necessary modification in NPMS and NSS to send warning bytes to NetworkStatsProvider. But since no any provider has been upgraded to handle such parameter. Thus, no behavior change is made in this patch. Test: atest NetworkPolicyManagerServiceTest NetworkStatsServiceTest Test: atest NetworkPolicyManagerServiceTest#testStatsProviderWarningAndLimitReached Bug: 149467454 Bug: 170699770 Bug: 170179169 Ignore-AOSP-First: avoid long automerger delay Change-Id: I6c4863030c36328db571294fd12a40e59864def5
This commit is contained in:
@@ -1674,11 +1674,14 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStatsProviderLimitAsync(@NonNull String iface, long quota) {
|
||||
if (LOGV) Slog.v(TAG, "setStatsProviderLimitAsync(" + iface + "," + quota + ")");
|
||||
// TODO: Set warning accordingly.
|
||||
public void setStatsProviderWarningAndLimitAsync(
|
||||
@NonNull String iface, long warning, long limit) {
|
||||
if (LOGV) {
|
||||
Slog.v(TAG, "setStatsProviderWarningAndLimitAsync("
|
||||
+ iface + "," + warning + "," + limit + ")");
|
||||
}
|
||||
invokeForAllStatsProviderCallbacks((cb) -> cb.mProvider.onSetWarningAndLimit(iface,
|
||||
NetworkStatsProvider.QUOTA_UNLIMITED, quota));
|
||||
warning, limit));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user