[DU01]Remove INetworkManagementService from NetworkStatsService
NetworkStatsService is using INetworkManagementService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.
The commit adds the public NetworkStatsUtils.LIMIT_GLOBAL_ALERT to
Replace the usage of NetworkManagementService.LIMIT_GLOBAL_ALERT in
NetworkStatsService.
Bug: 209738761
Test: atest NetworkStatsServiceTest
Change-Id: Ie4d4f9f0931958262367febecb4ca1a7824bba38
diff --git a/staticlibs/framework/com/android/net/module/util/NetworkStatsUtils.java b/staticlibs/framework/com/android/net/module/util/NetworkStatsUtils.java
index d4ad1f2..28ff770 100644
--- a/staticlibs/framework/com/android/net/module/util/NetworkStatsUtils.java
+++ b/staticlibs/framework/com/android/net/module/util/NetworkStatsUtils.java
@@ -68,6 +68,12 @@
public static final int SUBSCRIBER_ID_MATCH_RULE_ALL = 1;
/**
+ * Name representing {@link #bandwidthSetGlobalAlert(long)} limit when delivered to
+ * {@link AlertObserver#onQuotaLimitReached(String, String)}.
+ */
+ public static final String LIMIT_GLOBAL_ALERT = "globalAlert";
+
+ /**
* Return the constrained value by given the lower and upper bounds.
*/
public static int constrain(int amount, int low, int high) {