From 46ecccc4d4a510726803f7af6057d0c04be9dd70 Mon Sep 17 00:00:00 2001 From: junyulai Date: Wed, 10 Mar 2021 19:45:05 +0800 Subject: [PATCH] [SP31] Expose onSetWarningAndLimit System API Test: atest NetworkPolicyManagerServiceTest NetworkStatsServiceTest Bug: 149467454 CTS-Coverage-Bug: 183598414 Merged-In: I6f5e22e3a7b80a38cae9f3c5d7296a1dff34facf Change-Id: I6f5e22e3a7b80a38cae9f3c5d7296a1dff34facf (cherry-picked from ag/13981689) --- .../net/netstats/provider/NetworkStatsProvider.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/core/java/android/net/netstats/provider/NetworkStatsProvider.java b/core/java/android/net/netstats/provider/NetworkStatsProvider.java index 65b336ad6f..23fc06927e 100644 --- a/core/java/android/net/netstats/provider/NetworkStatsProvider.java +++ b/core/java/android/net/netstats/provider/NetworkStatsProvider.java @@ -147,10 +147,7 @@ public abstract class NetworkStatsProvider { /** * Notify system that the warning set by {@link #onSetWarningAndLimit} has been reached. - * - * @hide */ - // TODO: Expose as system API. public void notifyWarningReached() { try { // Reuse the code path to notify warning reached with limit reached @@ -198,7 +195,6 @@ public abstract class NetworkStatsProvider { * @param quotaBytes the quota defined as the number of bytes, starting from zero and counting * from now. A value of {@link #QUOTA_UNLIMITED} indicates there is no limit. */ - // TODO: deprecate this once onSetWarningAndLimit is ready. public abstract void onSetLimit(@NonNull String iface, long quotaBytes); /** @@ -217,10 +213,7 @@ public abstract class NetworkStatsProvider { * there is no warning. * @param limitBytes the limit defined as the number of bytes, starting from zero and counting * from now. A value of {@link #QUOTA_UNLIMITED} indicates there is no limit. - * - * @hide */ - // TODO: Expose as system API. public void onSetWarningAndLimit(@NonNull String iface, long warningBytes, long limitBytes) { // Backward compatibility for those who didn't override this function. onSetLimit(iface, limitBytes);