[DU04-2]Appropriate changes to the NetworkPolicyManager API

Divide the NetworkPolicyManager API
notifyStatsProviderWarningOrLimitReached into the following two APIs:
1. notifyStatsProviderWarningReached()
2. notifyStatsProviderLimitReached()

Bug: 216474563
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest OffloadControllerTest
Change-Id: Ic413eb532b5e24d4a7e2afabdcf643ab6607b1ed
This commit is contained in:
Frank
2022-03-04 15:03:36 +08:00
parent 96189e9851
commit b9bacae1fc
3 changed files with 15 additions and 7 deletions

View File

@@ -2393,10 +2393,17 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
}
@Override
public void notifyWarningOrLimitReached() {
Log.d(TAG, mTag + ": notifyWarningOrLimitReached");
public void notifyWarningReached() {
Log.d(TAG, mTag + ": notifyWarningReached");
BinderUtils.withCleanCallingIdentity(() ->
mNetworkPolicyManager.notifyStatsProviderWarningOrLimitReached());
mNetworkPolicyManager.notifyStatsProviderWarningReached());
}
@Override
public void notifyLimitReached() {
Log.d(TAG, mTag + ": notifyLimitReached");
BinderUtils.withCleanCallingIdentity(() ->
mNetworkPolicyManager.notifyStatsProviderLimitReached());
}
@Override