summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2017-08-15 19:25:51 +0900
committerLorenzo Colitti <lorenzo@google.com>2017-08-19 00:15:31 +0900
commit9f0baa94ca28f67e162d3ad04ca6d0e17ee5e314 (patch)
tree34ed3ff01daf584a939968052cdf4094eb9474f0 /core/java
parentdeb4eb5d05ccf983adcb7252c98c2580a8a36c60 (diff)
Tell the system when tethering offload hits a limit.
Add a new tetherLimitReached method to INetworkManagementService, and call it when the HAL notifies OffloadController because the limit has been reached. Bug: 29337859 Bug: 32163131 Test: builds Test: OffloadControllerTest passes (cherry picked from commit d66cf56ba662f10f2da1d0f844116632ad0a0dbb) Change-Id: I89719fe7ec8bfd3c85d6cdca9c0d449aea86ef9d Merged-In: I026e6aa9e7b371f316c0d97c3cf5e78abc1f5263
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/INetworkManagementService.aidl15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 3de217494ac5..316ef11f50de 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -220,6 +220,21 @@ interface INetworkManagementService
void unregisterTetheringStatsProvider(ITetheringStatsProvider provider);
/**
+ * Reports that a tethering provider has reached a data limit.
+ *
+ * Currently triggers a global alert, which causes NetworkStatsService to poll counters and
+ * re-evaluate data usage.
+ *
+ * This does not take an interface name because:
+ * 1. The tethering offload stats provider cannot reliably determine the interface on which the
+ * limit was reached, because the HAL does not provide it.
+ * 2. Firing an interface-specific alert instead of a global alert isn't really useful since in
+ * all cases of interest, the system responds to both in the same way - it polls stats, and
+ * then notifies NetworkPolicyManagerService of the fact.
+ */
+ void tetherLimitReached(ITetheringStatsProvider provider);
+
+ /**
** PPPD
**/