diff options
| author | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-02-28 08:42:50 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-02-28 08:42:50 +0000 |
| commit | 6dd84bef21718a46fe8b408db9f8f39e97f385d9 (patch) | |
| tree | 581066d77e9e7cc800596ddb4635e38e4f2f387b /core/java | |
| parent | e318343c6a4efc0ceae50a043d85cf5f679e2e2d (diff) | |
| parent | b1a83edb5cd2a5ce018536e16bec92f1c928fb03 (diff) | |
Merge "Merge "Add OEM_PAID network capability" am: 4c00edd361 am: 7b87c2050c am: 3b7de55419"
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/net/NetworkCapabilities.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java index bae373d7564b..9d94ecce1b8e 100644 --- a/core/java/android/net/NetworkCapabilities.java +++ b/core/java/android/net/NetworkCapabilities.java @@ -117,6 +117,7 @@ public final class NetworkCapabilities implements Parcelable { NET_CAPABILITY_FOREGROUND, NET_CAPABILITY_NOT_CONGESTED, NET_CAPABILITY_NOT_SUSPENDED, + NET_CAPABILITY_OEM_PAID, }) public @interface NetCapability { } @@ -264,8 +265,15 @@ public final class NetworkCapabilities implements Parcelable { */ public static final int NET_CAPABILITY_NOT_SUSPENDED = 21; + /** + * Indicates that traffic that goes through this network is paid by oem. For example, + * this network can be used by system apps to upload telemetry data. + * @hide + */ + public static final int NET_CAPABILITY_OEM_PAID = 22; + private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS; - private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_NOT_SUSPENDED; + private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_OEM_PAID; /** * Network capabilities that are expected to be mutable, i.e., can change while a particular @@ -313,7 +321,8 @@ public final class NetworkCapabilities implements Parcelable { (1 << NET_CAPABILITY_IA) | (1 << NET_CAPABILITY_IMS) | (1 << NET_CAPABILITY_RCS) | - (1 << NET_CAPABILITY_XCAP); + (1 << NET_CAPABILITY_XCAP) | + (1 << NET_CAPABILITY_OEM_PAID); /** * Capabilities that suggest that a network is unrestricted. @@ -1313,6 +1322,7 @@ public final class NetworkCapabilities implements Parcelable { case NET_CAPABILITY_FOREGROUND: return "FOREGROUND"; case NET_CAPABILITY_NOT_CONGESTED: return "NOT_CONGESTED"; case NET_CAPABILITY_NOT_SUSPENDED: return "NOT_SUSPENDED"; + case NET_CAPABILITY_OEM_PAID: return "OEM_PAID"; default: return Integer.toString(capability); } } |
