Merge "[SP31] Expose onSetWarningAndLimit System API" am: 24a5630161 am: c903776d23
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1625864 Change-Id: I022b2d130729f31fbd3fe8edaec6c998cdcd2aa4
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user