diff options
| -rw-r--r-- | telephony/java/android/telephony/Annotation.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/Annotation.java b/telephony/java/android/telephony/Annotation.java index 2435243f0044..8fe107cc1ad3 100644 --- a/telephony/java/android/telephony/Annotation.java +++ b/telephony/java/android/telephony/Annotation.java @@ -716,6 +716,31 @@ public class Annotation { }) public @interface NetCapability { } + + /** + * Representing the transport type. Apps should generally not care about transport. A + * request for a fast internet connection could be satisfied by a number of different + * transports. If any are specified here it will be satisfied a Network that matches + * any of them. If a caller doesn't care about the transport it should not specify any. + * Must update here when new capabilities are added in {@link NetworkCapabilities}. + */ + @Retention(RetentionPolicy.SOURCE) + @IntDef(prefix = { "TRANSPORT_" }, value = { + NetworkCapabilities.TRANSPORT_CELLULAR, + NetworkCapabilities.TRANSPORT_WIFI, + NetworkCapabilities.TRANSPORT_BLUETOOTH, + NetworkCapabilities.TRANSPORT_ETHERNET, + NetworkCapabilities.TRANSPORT_VPN, + NetworkCapabilities.TRANSPORT_WIFI_AWARE, + NetworkCapabilities.TRANSPORT_LOWPAN, + NetworkCapabilities.TRANSPORT_TEST, + NetworkCapabilities.TRANSPORT_USB, + NetworkCapabilities.TRANSPORT_THREAD, + NetworkCapabilities.TRANSPORT_SATELLITE, + }) + public @interface ConnectivityTransport { } + + /** * Per Android API guideline 8.15, annotation can't be public APIs. So duplicate * android.net.NetworkAgent.ValidationStatus here. Must update here when new validation status |