From 7403f8207b393c6cd816737c9a5858e0adeea1dc Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 10 Apr 2018 12:38:29 -0600 Subject: [PATCH] APIs to disable data usage notifications. Certain carriers have requested the ability to disable the warning, limit, and rapid data usage notifications shown by the OS, so give them that ability on a per-subId basis. (The notifications are still enabled by default.) Unhide NOT_CONGESTED to match setSubscriptionOverrideCongested(). Fix bug in getPrimarySubscriptionPlanLocked() to find the first currently active plan; the first non-recurring plan may be no longer active. Fix bug in SubscriptionPlan which allowed invalid negative or zero-length Period objects. Bug: 77851691, 77506882, 77662747 Test: atest com.android.server.NetworkPolicyManagerServiceTest Test: atest android.telephony.cts.SubscriptionManagerTest Exempt-From-Owner-Approval: SDK deadline, responding to API feedback Change-Id: Ib6e6dbadd5022937c3f0661ab4b66aa617f0b5af --- core/java/android/net/NetworkCapabilities.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java index c314a358a2..a8e81791fe 100644 --- a/core/java/android/net/NetworkCapabilities.java +++ b/core/java/android/net/NetworkCapabilities.java @@ -254,9 +254,8 @@ public final class NetworkCapabilities implements Parcelable { /** * Indicates that this network is not congested. *

- * When a network is congested, the device should defer network traffic that - * can be done at a later time without breaking developer contracts. - * @hide + * When a network is congested, applications should defer network traffic + * that can be done at a later time, such as uploading analytics. */ public static final int NET_CAPABILITY_NOT_CONGESTED = 20;