diff options
author | Jeff Sharkey <jsharkey@android.com> | 2018-01-19 18:02:47 +0900 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2018-01-19 18:18:51 +0900 |
commit | 2e4714575ff7aac65a0e107cbf2dd03fa3affe95 (patch) | |
tree | 91f96552a4d5769dfe0208bf325db43e47762939 /proto/src/system_messages.proto | |
parent | 9252b34065809731ea2f6d3ffad91f678f809c93 (diff) |
Alert user on rapid/heavy data usage.
Now that we have accurate information about a user's carrier data
plan, we can alert them if the current usage patterns would end up
with a nasty surprise towards the end of the current billing cycle.
For example, a single abusive app could use 90% of the user's budget
within the first few days of a billing cycle, leaving the user to
limp along for the remainder of the month.
The simple algorithm here extrapolates to see if the average usage
over the last 4 days would be more than 150% of the data limit for
the full billing cycle. This period is short enough to catch rapid
recent usage, but long enough to smooth over short-term habit
changes, such as a weekend getaway. This was chosen after
backtesting the proposed algorithm against real-world data usage
from a handful of internal users.
Fix NPMS unit tests, and write new ones, but leave the existing
@Ignored annotation intact for now.
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 64133169
Change-Id: I0d394b133257e8569a9aa2631b57638839d870ce
Diffstat (limited to 'proto/src/system_messages.proto')
-rw-r--r-- | proto/src/system_messages.proto | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/src/system_messages.proto b/proto/src/system_messages.proto index d817da53f523..7c6019e76416 100644 --- a/proto/src/system_messages.proto +++ b/proto/src/system_messages.proto @@ -193,6 +193,9 @@ message SystemMessage { // Inform the user that Wifi Wake has automatically re-enabled Wifi NOTE_WIFI_WAKE_TURNED_BACK_ON = 44; + // Inform the user that unexpectedly rapid network usage is happening + NOTE_NET_RAPID = 45; + // ADD_NEW_IDS_ABOVE_THIS_LINE // Legacy IDs with arbitrary values appear below // Legacy IDs existed as stable non-conflicting constants prior to the O release |