From d4a9ed4b1a7f91050ac90f6bc979cd86a874d355 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Thu, 11 Mar 2021 20:29:10 +0900 Subject: [PATCH] Remove hidden @NetworkType in NetworkInfo The NetworkType annotation is a hidden telephony symbol, and should be kept hidden as annotations are disallowed by API guidelines. Remove its usage in NetworkInfo as users of annotated constants that build against API stubs are expected not to use the annotation. Bug: 182451544 Test: m Change-Id: I6658c1faa147c527c989b87d67f1af166c488dde --- framework/src/android/net/NetworkInfo.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/src/android/net/NetworkInfo.java b/framework/src/android/net/NetworkInfo.java index d752901e2e..bb23494593 100644 --- a/framework/src/android/net/NetworkInfo.java +++ b/framework/src/android/net/NetworkInfo.java @@ -21,7 +21,6 @@ import android.annotation.Nullable; import android.compat.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; -import android.telephony.Annotation.NetworkType; import android.text.TextUtils; import com.android.internal.annotations.VisibleForTesting; @@ -164,7 +163,7 @@ public class NetworkInfo implements Parcelable { * @param typeName a human-readable string for the network type, or an empty string or null. * @param subtypeName a human-readable string for the subtype, or an empty string or null. */ - public NetworkInfo(int type, @NetworkType int subtype, + public NetworkInfo(int type, int subtype, @Nullable String typeName, @Nullable String subtypeName) { if (!ConnectivityManager.isNetworkTypeValid(type) && type != ConnectivityManager.TYPE_NONE) {