diff options
| author | 2020-11-19 18:02:28 +0000 | |
|---|---|---|
| committer | 2020-11-19 18:02:28 +0000 | |
| commit | b6771dff52c401ca7bf33bcd827cee9de33ccaef (patch) | |
| tree | 24f3c591fb323b20cf19264d82a0b7905dfd6389 | |
| parent | b1296e900d47e312e616f9004e8b29ba0dce0091 (diff) | |
| parent | 9e7ff9a16711201ae482bb5cf1d05bf9807041f5 (diff) | |
Merge "Clarify documentation on TEMP_NOT_METERED API" am: 9e7ff9a167
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1504954
Change-Id: I36d911d227ed4ac8e7b23f52036ff384977e2248
| -rw-r--r-- | core/java/android/net/NetworkCapabilities.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java index 7c2636c52be8..40bb8bf11d0b 100644 --- a/core/java/android/net/NetworkCapabilities.java +++ b/core/java/android/net/NetworkCapabilities.java @@ -339,10 +339,14 @@ public final class NetworkCapabilities implements Parcelable { public static final int NET_CAPABILITY_PARTIAL_CONNECTIVITY = 24; /** + * Indicates that this network is temporarily unmetered. + * <p> * This capability will be set for networks that are generally metered, but are currently * unmetered, e.g., because the user is in a particular area. This capability can be changed at * any time. When it is removed, applications are responsible for stopping any data transfer * that should not occur on a metered network. + * Note that most apps should use {@link #NET_CAPABILITY_NOT_METERED} instead. For more + * information, see https://developer.android.com/about/versions/11/features/5g#meteredness. */ public static final int NET_CAPABILITY_TEMPORARILY_NOT_METERED = 25; @@ -370,8 +374,8 @@ public final class NetworkCapabilities implements Parcelable { | (1 << NET_CAPABILITY_FOREGROUND) | (1 << NET_CAPABILITY_NOT_CONGESTED) | (1 << NET_CAPABILITY_NOT_SUSPENDED) - | (1 << NET_CAPABILITY_PARTIAL_CONNECTIVITY - | (1 << NET_CAPABILITY_TEMPORARILY_NOT_METERED)); + | (1 << NET_CAPABILITY_PARTIAL_CONNECTIVITY) + | (1 << NET_CAPABILITY_TEMPORARILY_NOT_METERED); /** * Network capabilities that are not allowed in NetworkRequests. This exists because the |