Merge "Convert uses of @hide to block tag" into main

This commit is contained in:
Treehugger Robot 2025-09-08 04:21:26 -07:00 • committed by Android (Google) Code Review
commit 4910c42dc7
55 changed files with 159 additions and 132 deletions

View file

@ -18,7 +18,7 @@ package android.net;
/** /**
* Listener interface allowing objects to listen to various module event. * Listener interface allowing objects to listen to various module event.
* {@hide} * @hide
*/ */
oneway interface IIntResultListener { oneway interface IIntResultListener {
void onResult(int resultCode); void onResult(int resultCode);

View file

@ -20,7 +20,7 @@ import android.net.TetheringInterface;
/** /**
* Status details for tethering downstream interfaces. * Status details for tethering downstream interfaces.
* {@hide} * @hide
*/ */
parcelable TetherStatesParcel { parcelable TetherStatesParcel {
TetheringInterface[] availableList; TetheringInterface[] availableList;

View file

@ -381,7 +381,7 @@ public class TetheringManager {
* @param context Context for the manager. * @param context Context for the manager.
* @param connectorSupplier Supplier for the manager connector; may return null while the * @param connectorSupplier Supplier for the manager connector; may return null while the
* service is not connected. * service is not connected.
* {@hide} * @hide
*/ */
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)
public TetheringManager(@NonNull final Context context, public TetheringManager(@NonNull final Context context,
@ -574,7 +574,7 @@ public class TetheringManager {
* already released. * already released.
* 2. This is not synchronous, so it's not useful to use try-with-resources. * 2. This is not synchronous, so it's not useful to use try-with-resources.
* *
* {@hide} * @hide
*/ */
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)
@SuppressLint("NotCloseable") @SuppressLint("NotCloseable")
@ -588,7 +588,7 @@ public class TetheringManager {
/** /**
* Callback for requestTetheredInterface. * Callback for requestTetheredInterface.
* *
* {@hide} * @hide
*/ */
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)
public interface TetheredInterfaceCallback { public interface TetheredInterfaceCallback {
@ -694,7 +694,7 @@ public class TetheringManager {
* @param iface the interface name to tether. * @param iface the interface name to tether.
* @return error a {@code TETHER_ERROR} value indicating success or failure type * @return error a {@code TETHER_ERROR} value indicating success or failure type
* *
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)
@ -729,7 +729,7 @@ public class TetheringManager {
* On SDK versions after {@link Build.VERSION_CODES.VANILLA_ICE_CREAM}, this will * On SDK versions after {@link Build.VERSION_CODES.VANILLA_ICE_CREAM}, this will
* throw an UnsupportedOperationException. * throw an UnsupportedOperationException.
* *
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)
@ -758,7 +758,7 @@ public class TetheringManager {
* used and an entitlement check is needed, downstream USB tethering will be enabled but will * used and an entitlement check is needed, downstream USB tethering will be enabled but will
* not have any upstream. * not have any upstream.
* *
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)
@ -1553,7 +1553,7 @@ public class TetheringManager {
* Helper function of #requestLatestTetheringEntitlementResult to remain backwards compatible * Helper function of #requestLatestTetheringEntitlementResult to remain backwards compatible
* with ConnectivityManager#getLatestTetheringEntitlementResult * with ConnectivityManager#getLatestTetheringEntitlementResult
* *
* {@hide} * @hide
*/ */
// TODO: improve the usage of ResultReceiver, b/145096122 // TODO: improve the usage of ResultReceiver, b/145096122
@SystemApi(client = MODULE_LIBRARIES) @SystemApi(client = MODULE_LIBRARIES)

View file

@ -30,7 +30,7 @@ import java.io.IOException;
/** /**
* The classes and the methods for BPF utilization. * The classes and the methods for BPF utilization.
* *
* {@hide} * @hide
*/ */
public class BpfUtils { public class BpfUtils {
static { static {

View file

@ -48,7 +48,7 @@ import java.util.Arrays;
/** /**
* The classes and the methods for tethering utilization. * The classes and the methods for tethering utilization.
* *
* {@hide} * @hide
*/ */
public class TetheringUtils { public class TetheringUtils {
static { static {

View file

@ -192,7 +192,10 @@ public class VcnManager {
public static final String VCN_TUNNEL_AGGREGATION_SA_COUNT_MAX_KEY = public static final String VCN_TUNNEL_AGGREGATION_SA_COUNT_MAX_KEY =
"vcn_tunnel_aggregation_sa_count_max"; "vcn_tunnel_aggregation_sa_count_max";
/** List of Carrier Config options to extract from Carrier Config bundles. @hide */ /**
* List of Carrier Config options to extract from Carrier Config bundles.
* @hide
*/
@NonNull @NonNull
public static final String[] VCN_RELATED_CARRIER_CONFIG_KEYS = public static final String[] VCN_RELATED_CARRIER_CONFIG_KEYS =
new String[] { new String[] {

View file

@ -29,7 +29,7 @@ import java.util.List;
* Interface that answers queries about, and allows changing * Interface that answers queries about, and allows changing
* ethernet configuration. * ethernet configuration.
*/ */
/** {@hide} */ /** @hide */
interface IEthernetManager interface IEthernetManager
{ {
String[] getAvailableInterfaces(); String[] getAvailableInterfaces();

View file

@ -31,7 +31,7 @@ import android.net.netstats.provider.INetworkStatsProviderCallback;
import android.os.IBinder; import android.os.IBinder;
import android.os.Messenger; import android.os.Messenger;
/** {@hide} */ /** @hide */
interface INetworkStatsService { interface INetworkStatsService {
/** Start a statistics query session. */ /** Start a statistics query session. */

View file

@ -20,7 +20,7 @@ import android.net.NetworkStats;
import android.net.NetworkStatsHistory; import android.net.NetworkStatsHistory;
import android.net.NetworkTemplate; import android.net.NetworkTemplate;
/** {@hide} */ /** @hide */
interface INetworkStatsSession { interface INetworkStatsSession {
/** Return device aggregated network layer usage summary for traffic that matches template. */ /** Return device aggregated network layer usage summary for traffic that matches template. */

View file

@ -773,7 +773,7 @@ public class TrafficStats {
} }
} }
/** {@hide} */ /** @hide */
public static void closeQuietly(INetworkStatsSession session) { public static void closeQuietly(INetworkStatsSession session) {
// TODO: move to NetworkStatsService once it exists // TODO: move to NetworkStatsService once it exists
if (session != null) { if (session != null) {
@ -858,13 +858,13 @@ public class TrafficStats {
return total; return total;
} }
/** {@hide} */ /** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static long getMobileTcpRxPackets() { public static long getMobileTcpRxPackets() {
return UNSUPPORTED; return UNSUPPORTED;
} }
/** {@hide} */ /** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static long getMobileTcpTxPackets() { public static long getMobileTcpTxPackets() {
return UNSUPPORTED; return UNSUPPORTED;
@ -970,25 +970,25 @@ public class TrafficStats {
return getIfaceStats(iface, TYPE_RX_BYTES); return getIfaceStats(iface, TYPE_RX_BYTES);
} }
/** {@hide} */ /** @hide */
@TestApi @TestApi
public static long getLoopbackTxPackets() { public static long getLoopbackTxPackets() {
return getIfaceStats(LOOPBACK_IFACE, TYPE_TX_PACKETS); return getIfaceStats(LOOPBACK_IFACE, TYPE_TX_PACKETS);
} }
/** {@hide} */ /** @hide */
@TestApi @TestApi
public static long getLoopbackRxPackets() { public static long getLoopbackRxPackets() {
return getIfaceStats(LOOPBACK_IFACE, TYPE_RX_PACKETS); return getIfaceStats(LOOPBACK_IFACE, TYPE_RX_PACKETS);
} }
/** {@hide} */ /** @hide */
@TestApi @TestApi
public static long getLoopbackTxBytes() { public static long getLoopbackTxBytes() {
return getIfaceStats(LOOPBACK_IFACE, TYPE_TX_BYTES); return getIfaceStats(LOOPBACK_IFACE, TYPE_TX_BYTES);
} }
/** {@hide} */ /** @hide */
@TestApi @TestApi
public static long getLoopbackRxBytes() { public static long getLoopbackRxBytes() {
return getIfaceStats(LOOPBACK_IFACE, TYPE_RX_BYTES); return getIfaceStats(LOOPBACK_IFACE, TYPE_RX_BYTES);
@ -1325,13 +1325,13 @@ public class TrafficStats {
} }
// NOTE: keep these in sync with {@code com_android_server_net_NetworkStatsService.cpp}. // NOTE: keep these in sync with {@code com_android_server_net_NetworkStatsService.cpp}.
/** {@hide} */ /** @hide */
public static final int TYPE_RX_BYTES = 0; public static final int TYPE_RX_BYTES = 0;
/** {@hide} */ /** @hide */
public static final int TYPE_RX_PACKETS = 1; public static final int TYPE_RX_PACKETS = 1;
/** {@hide} */ /** @hide */
public static final int TYPE_TX_BYTES = 2; public static final int TYPE_TX_BYTES = 2;
/** {@hide} */ /** @hide */
public static final int TYPE_TX_PACKETS = 3; public static final int TYPE_TX_PACKETS = 3;
/** @hide */ /** @hide */

View file

@ -23,7 +23,7 @@ import android.os.Messenger;
/** /**
* Interface that NsdService implements to connect NsdManager clients. * Interface that NsdService implements to connect NsdManager clients.
* *
* {@hide} * @hide
*/ */
interface INsdManager { interface INsdManager {
INsdServiceConnector connect(INsdManagerCallback cb, boolean useJavaBackend); INsdServiceConnector connect(INsdManagerCallback cb, boolean useJavaBackend);

View file

@ -26,7 +26,7 @@ import android.os.Messenger;
/** /**
* Interface that NsdService implements for each NsdManager client. * Interface that NsdService implements for each NsdManager client.
* *
* {@hide} * @hide
*/ */
interface INsdServiceConnector { interface INsdServiceConnector {
void registerService(int listenerKey, in AdvertisingRequest advertisingRequest); void registerService(int listenerKey, in AdvertisingRequest advertisingRequest);

View file

@ -271,7 +271,7 @@ public class ConnectivityManager {
* our connection to the internet at large. 0 indicates no connection, * our connection to the internet at large. 0 indicates no connection,
* 100 indicates a great connection. Retrieve it with * 100 indicates a great connection. Retrieve it with
* {@link android.content.Intent#getIntExtra(String, int)}. * {@link android.content.Intent#getIntExtra(String, int)}.
* {@hide} * @hide
*/ */
public static final String EXTRA_INET_CONDITION = "inetCondition"; public static final String EXTRA_INET_CONDITION = "inetCondition";
/** /**
@ -292,7 +292,7 @@ public class ConnectivityManager {
/** /**
* Key for passing a {@link android.net.captiveportal.CaptivePortalProbeSpec} to the captive * Key for passing a {@link android.net.captiveportal.CaptivePortalProbeSpec} to the captive
* portal login activity. * portal login activity.
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC = public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC =
@ -300,7 +300,7 @@ public class ConnectivityManager {
/** /**
* Key for passing a user agent string to the captive portal login activity. * Key for passing a user agent string to the captive portal login activity.
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT =
@ -311,7 +311,7 @@ public class ConnectivityManager {
* (idle or active) on a network in a recent period. * (idle or active) on a network in a recent period.
* The network becomes active when data transmission is started, or * The network becomes active when data transmission is started, or
* idle if there is no data transmission for a period of time. * idle if there is no data transmission for a period of time.
* {@hide} * @hide
*/ */
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_DATA_ACTIVITY_CHANGE = public static final String ACTION_DATA_ACTIVITY_CHANGE =
@ -319,18 +319,18 @@ public class ConnectivityManager {
/** /**
* The lookup key for an enum that indicates the network device type on which this data activity * The lookup key for an enum that indicates the network device type on which this data activity
* change happens. * change happens.
* {@hide} * @hide
*/ */
public static final String EXTRA_DEVICE_TYPE = "deviceType"; public static final String EXTRA_DEVICE_TYPE = "deviceType";
/** /**
* The lookup key for a boolean that indicates the device is active or not. {@code true} means * The lookup key for a boolean that indicates the device is active or not. {@code true} means
* it is actively sending or receiving data and {@code false} means it is idle. * it is actively sending or receiving data and {@code false} means it is idle.
* {@hide} * @hide
*/ */
public static final String EXTRA_IS_ACTIVE = "isActive"; public static final String EXTRA_IS_ACTIVE = "isActive";
/** /**
* The lookup key for a long that contains the timestamp (nanos) of the radio state change. * The lookup key for a long that contains the timestamp (nanos) of the radio state change.
* {@hide} * @hide
*/ */
public static final String EXTRA_REALTIME_NS = "tsNanos"; public static final String EXTRA_REALTIME_NS = "tsNanos";
@ -674,7 +674,7 @@ public class ConnectivityManager {
/** /**
* Over the air Administration. * Over the air Administration.
* @deprecated Use {@link NetworkCapabilities} instead. * @deprecated Use {@link NetworkCapabilities} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562)
@ -683,7 +683,7 @@ public class ConnectivityManager {
/** /**
* IP Multimedia Subsystem. * IP Multimedia Subsystem.
* @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_IMS} instead. * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_IMS} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@UnsupportedAppUsage @UnsupportedAppUsage
@ -692,7 +692,7 @@ public class ConnectivityManager {
/** /**
* Carrier Branded Services. * Carrier Branded Services.
* @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_CBS} instead. * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_CBS} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562)
@ -702,7 +702,7 @@ public class ConnectivityManager {
* A Wi-Fi p2p connection. Only requesting processes will have access to * A Wi-Fi p2p connection. Only requesting processes will have access to
* the peers connected. * the peers connected.
* @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_WIFI_P2P} instead. * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_WIFI_P2P} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@SystemApi @SystemApi
@ -711,7 +711,7 @@ public class ConnectivityManager {
/** /**
* The network to use for initially attaching to the network * The network to use for initially attaching to the network
* @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_IA} instead. * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_IA} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@UnsupportedAppUsage @UnsupportedAppUsage
@ -721,7 +721,7 @@ public class ConnectivityManager {
* Emergency PDN connection for emergency services. This * Emergency PDN connection for emergency services. This
* may include IMS and MMS in emergency situations. * may include IMS and MMS in emergency situations.
* @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_EIMS} instead. * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_EIMS} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562)
@ -730,7 +730,7 @@ public class ConnectivityManager {
/** /**
* The network that uses proxy to achieve connectivity. * The network that uses proxy to achieve connectivity.
* @deprecated Use {@link NetworkCapabilities} instead. * @deprecated Use {@link NetworkCapabilities} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@SystemApi @SystemApi
@ -789,10 +789,10 @@ public class ConnectivityManager {
private static final int DEPRECATED_PHONE_CONSTANT_APN_REQUEST_STARTED = 1; private static final int DEPRECATED_PHONE_CONSTANT_APN_REQUEST_STARTED = 1;
private static final int DEPRECATED_PHONE_CONSTANT_APN_REQUEST_FAILED = 3; private static final int DEPRECATED_PHONE_CONSTANT_APN_REQUEST_FAILED = 3;
/** {@hide} */ /** @hide */
public static final int MAX_RADIO_TYPE = TYPE_TEST; public static final int MAX_RADIO_TYPE = TYPE_TEST;
/** {@hide} */ /** @hide */
public static final int MAX_NETWORK_TYPE = TYPE_TEST; public static final int MAX_NETWORK_TYPE = TYPE_TEST;
private static final int MIN_NETWORK_TYPE = TYPE_MOBILE; private static final int MIN_NETWORK_TYPE = TYPE_MOBILE;
@ -1293,7 +1293,7 @@ public class ConnectivityManager {
* @return a String for the given type, or a string version of the type ("87") * @return a String for the given type, or a string version of the type ("87")
* if no name is known. * if no name is known.
* @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead. * @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@ -1362,7 +1362,7 @@ public class ConnectivityManager {
* @param networkType the type to check * @param networkType the type to check
* @return a boolean - {@code true} if uses cellular network, else {@code false} * @return a boolean - {@code true} if uses cellular network, else {@code false}
* @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead. * @deprecated Types are deprecated. Use {@link NetworkCapabilities} instead.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 130143562)
@ -1564,7 +1564,7 @@ public class ConnectivityManager {
return getActiveNetworkForUid(uid, false); return getActiveNetworkForUid(uid, false);
} }
/** {@hide} */ /** @hide */
public Network getActiveNetworkForUid(int uid, boolean ignoreBlocked) { public Network getActiveNetworkForUid(int uid, boolean ignoreBlocked) {
try { try {
return mService.getActiveNetworkForUid(uid, ignoreBlocked); return mService.getActiveNetworkForUid(uid, ignoreBlocked);
@ -1734,7 +1734,7 @@ public class ConnectivityManager {
* for the given uid or {@code null} if no default network is * for the given uid or {@code null} if no default network is
* available for the specified uid. * available for the specified uid.
* *
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.NETWORK_STACK) @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@ -1742,7 +1742,7 @@ public class ConnectivityManager {
return getActiveNetworkInfoForUid(uid, false); return getActiveNetworkInfoForUid(uid, false);
} }
/** {@hide} */ /** @hide */
public NetworkInfo getActiveNetworkInfoForUid(int uid, boolean ignoreBlocked) { public NetworkInfo getActiveNetworkInfoForUid(int uid, boolean ignoreBlocked) {
try { try {
return mService.getActiveNetworkInfoForUid(uid, ignoreBlocked); return mService.getActiveNetworkInfoForUid(uid, ignoreBlocked);
@ -1796,7 +1796,7 @@ public class ConnectivityManager {
return getNetworkInfoForUid(network, Process.myUid(), false); return getNetworkInfoForUid(network, Process.myUid(), false);
} }
/** {@hide} */ /** @hide */
public NetworkInfo getNetworkInfoForUid(Network network, int uid, boolean ignoreBlocked) { public NetworkInfo getNetworkInfoForUid(Network network, int uid, boolean ignoreBlocked) {
try { try {
return mService.getNetworkInfoForUid(network, uid, ignoreBlocked); return mService.getNetworkInfoForUid(network, uid, ignoreBlocked);
@ -1910,7 +1910,7 @@ public class ConnectivityManager {
* for the current default network, or {@code null} if there * for the current default network, or {@code null} if there
* is no current default network. * is no current default network.
* *
* {@hide} * @hide
* @deprecated please use {@link #getLinkProperties(Network)} on the return * @deprecated please use {@link #getLinkProperties(Network)} on the return
* value of {@link #getActiveNetwork()} instead. In particular, * value of {@link #getActiveNetwork()} instead. In particular,
* this method will return non-null LinkProperties even if the * this method will return non-null LinkProperties even if the
@ -1934,7 +1934,7 @@ public class ConnectivityManager {
* for the given networkType, or {@code null} if there is * for the given networkType, or {@code null} if there is
* no current default network. * no current default network.
* *
* {@hide} * @hide
* @deprecated This method does not support multiple connected networks * @deprecated This method does not support multiple connected networks
* of the same type. Use {@link #getAllNetworks}, * of the same type. Use {@link #getAllNetworks},
* {@link #getNetworkInfo(android.net.Network)}, and * {@link #getNetworkInfo(android.net.Network)}, and
@ -2929,7 +2929,7 @@ public class ConnectivityManager {
} }
/** /**
* {@hide} * @hide
*/ */
public ConnectivityManager(Context context, IConnectivityManager service) { public ConnectivityManager(Context context, IConnectivityManager service) {
this(context, service, true /* newStatic */); this(context, service, true /* newStatic */);
@ -2952,7 +2952,7 @@ public class ConnectivityManager {
} }
} }
/** {@hide} */ /** @hide */
@UnsupportedAppUsage @UnsupportedAppUsage
public static ConnectivityManager from(Context context) { public static ConnectivityManager from(Context context) {
return (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); return (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
@ -3013,7 +3013,7 @@ public class ConnectivityManager {
* @return an array of 0 or more Strings of tetherable interface names. * @return an array of 0 or more Strings of tetherable interface names.
* *
* @deprecated Use {@link TetheringEventCallback#onTetherableInterfacesChanged(List)} instead. * @deprecated Use {@link TetheringEventCallback#onTetherableInterfacesChanged(List)} instead.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
@UnsupportedAppUsage @UnsupportedAppUsage
@ -3028,7 +3028,7 @@ public class ConnectivityManager {
* @return an array of 0 or more String of currently tethered interface names. * @return an array of 0 or more String of currently tethered interface names.
* *
* @deprecated Use {@link TetheringEventCallback#onTetherableInterfacesChanged(List)} instead. * @deprecated Use {@link TetheringEventCallback#onTetherableInterfacesChanged(List)} instead.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
@UnsupportedAppUsage @UnsupportedAppUsage
@ -3049,7 +3049,7 @@ public class ConnectivityManager {
* which failed to tether. * which failed to tether.
* *
* @deprecated Use {@link TetheringEventCallback#onError(String, int)} instead. * @deprecated Use {@link TetheringEventCallback#onError(String, int)} instead.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
@UnsupportedAppUsage @UnsupportedAppUsage
@ -3063,7 +3063,7 @@ public class ConnectivityManager {
* *
* @deprecated This method is not supported. * @deprecated This method is not supported.
* TODO: remove this function when all of clients are removed. * TODO: remove this function when all of clients are removed.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
@Deprecated @Deprecated
@ -3095,7 +3095,7 @@ public class ConnectivityManager {
* @return error a {@code TETHER_ERROR} value indicating success or failure type * @return error a {@code TETHER_ERROR} value indicating success or failure type
* @deprecated Use {@link TetheringManager#startTethering} instead * @deprecated Use {@link TetheringManager#startTethering} instead
* *
* {@hide} * @hide
*/ */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@Deprecated @Deprecated
@ -3120,7 +3120,7 @@ public class ConnectivityManager {
* @param iface the interface name to untether. * @param iface the interface name to untether.
* @return error a {@code TETHER_ERROR} value indicating success or failure type * @return error a {@code TETHER_ERROR} value indicating success or failure type
* *
* {@hide} * @hide
*/ */
@UnsupportedAppUsage @UnsupportedAppUsage
@Deprecated @Deprecated
@ -3145,7 +3145,7 @@ public class ConnectivityManager {
* @return a boolean - {@code true} indicating Tethering is supported. * @return a boolean - {@code true} indicating Tethering is supported.
* *
* @deprecated Use {@link TetheringEventCallback#onTetheringSupported(boolean)} instead. * @deprecated Use {@link TetheringEventCallback#onTetheringSupported(boolean)} instead.
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
@RequiresPermission(anyOf = {android.Manifest.permission.TETHER_PRIVILEGED, @RequiresPermission(anyOf = {android.Manifest.permission.TETHER_PRIVILEGED,
@ -3357,7 +3357,7 @@ public class ConnectivityManager {
* what interfaces are considered tetherable usb interfaces. * what interfaces are considered tetherable usb interfaces.
* *
* @deprecated Use {@link TetheringEventCallback#onTetherableInterfaceRegexpsChanged} instead. * @deprecated Use {@link TetheringEventCallback#onTetherableInterfaceRegexpsChanged} instead.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
@UnsupportedAppUsage @UnsupportedAppUsage
@ -3375,7 +3375,7 @@ public class ConnectivityManager {
* what interfaces are considered tetherable wifi interfaces. * what interfaces are considered tetherable wifi interfaces.
* *
* @deprecated Use {@link TetheringEventCallback#onTetherableInterfaceRegexpsChanged} instead. * @deprecated Use {@link TetheringEventCallback#onTetherableInterfaceRegexpsChanged} instead.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
@UnsupportedAppUsage @UnsupportedAppUsage
@ -3394,7 +3394,7 @@ public class ConnectivityManager {
* *
* @deprecated Use {@link TetheringEventCallback#onTetherableInterfaceRegexpsChanged( * @deprecated Use {@link TetheringEventCallback#onTetherableInterfaceRegexpsChanged(
*TetheringManager.TetheringInterfaceRegexps)} instead. *TetheringManager.TetheringInterfaceRegexps)} instead.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
@UnsupportedAppUsage @UnsupportedAppUsage
@ -3419,7 +3419,7 @@ public class ConnectivityManager {
* @return error a {@code TETHER_ERROR} value indicating success or failure type * @return error a {@code TETHER_ERROR} value indicating success or failure type
* @deprecated Use {@link TetheringManager#startTethering} instead * @deprecated Use {@link TetheringManager#startTethering} instead
* *
* {@hide} * @hide
*/ */
@UnsupportedAppUsage @UnsupportedAppUsage
@Deprecated @Deprecated
@ -3429,97 +3429,97 @@ public class ConnectivityManager {
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_NO_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_NO_ERROR}.
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
@Deprecated @Deprecated
public static final int TETHER_ERROR_NO_ERROR = 0; public static final int TETHER_ERROR_NO_ERROR = 0;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_UNKNOWN_IFACE}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_UNKNOWN_IFACE}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_UNKNOWN_IFACE = public static final int TETHER_ERROR_UNKNOWN_IFACE =
TetheringManager.TETHER_ERROR_UNKNOWN_IFACE; TetheringManager.TETHER_ERROR_UNKNOWN_IFACE;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_SERVICE_UNAVAIL}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_SERVICE_UNAVAIL}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_SERVICE_UNAVAIL = public static final int TETHER_ERROR_SERVICE_UNAVAIL =
TetheringManager.TETHER_ERROR_SERVICE_UNAVAIL; TetheringManager.TETHER_ERROR_SERVICE_UNAVAIL;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_UNSUPPORTED}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_UNSUPPORTED}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_UNSUPPORTED = TetheringManager.TETHER_ERROR_UNSUPPORTED; public static final int TETHER_ERROR_UNSUPPORTED = TetheringManager.TETHER_ERROR_UNSUPPORTED;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_UNAVAIL_IFACE}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_UNAVAIL_IFACE}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_UNAVAIL_IFACE = public static final int TETHER_ERROR_UNAVAIL_IFACE =
TetheringManager.TETHER_ERROR_UNAVAIL_IFACE; TetheringManager.TETHER_ERROR_UNAVAIL_IFACE;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_INTERNAL_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_INTERNAL_ERROR}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_MASTER_ERROR = public static final int TETHER_ERROR_MASTER_ERROR =
TetheringManager.TETHER_ERROR_INTERNAL_ERROR; TetheringManager.TETHER_ERROR_INTERNAL_ERROR;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_TETHER_IFACE_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_TETHER_IFACE_ERROR}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_TETHER_IFACE_ERROR = public static final int TETHER_ERROR_TETHER_IFACE_ERROR =
TetheringManager.TETHER_ERROR_TETHER_IFACE_ERROR; TetheringManager.TETHER_ERROR_TETHER_IFACE_ERROR;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_UNTETHER_IFACE_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_UNTETHER_IFACE_ERROR}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_UNTETHER_IFACE_ERROR = public static final int TETHER_ERROR_UNTETHER_IFACE_ERROR =
TetheringManager.TETHER_ERROR_UNTETHER_IFACE_ERROR; TetheringManager.TETHER_ERROR_UNTETHER_IFACE_ERROR;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_ENABLE_FORWARDING_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_ENABLE_FORWARDING_ERROR}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_ENABLE_NAT_ERROR = public static final int TETHER_ERROR_ENABLE_NAT_ERROR =
TetheringManager.TETHER_ERROR_ENABLE_FORWARDING_ERROR; TetheringManager.TETHER_ERROR_ENABLE_FORWARDING_ERROR;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_DISABLE_FORWARDING_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_DISABLE_FORWARDING_ERROR}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_DISABLE_NAT_ERROR = public static final int TETHER_ERROR_DISABLE_NAT_ERROR =
TetheringManager.TETHER_ERROR_DISABLE_FORWARDING_ERROR; TetheringManager.TETHER_ERROR_DISABLE_FORWARDING_ERROR;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_IFACE_CFG_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_IFACE_CFG_ERROR}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_IFACE_CFG_ERROR = public static final int TETHER_ERROR_IFACE_CFG_ERROR =
TetheringManager.TETHER_ERROR_IFACE_CFG_ERROR; TetheringManager.TETHER_ERROR_IFACE_CFG_ERROR;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_PROVISIONING_FAILED}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_PROVISIONING_FAILED}.
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
@Deprecated @Deprecated
public static final int TETHER_ERROR_PROVISION_FAILED = 11; public static final int TETHER_ERROR_PROVISION_FAILED = 11;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_DHCPSERVER_ERROR}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_DHCPSERVER_ERROR}.
* {@hide} * @hide
*/ */
@Deprecated @Deprecated
public static final int TETHER_ERROR_DHCPSERVER_ERROR = public static final int TETHER_ERROR_DHCPSERVER_ERROR =
TetheringManager.TETHER_ERROR_DHCPSERVER_ERROR; TetheringManager.TETHER_ERROR_DHCPSERVER_ERROR;
/** /**
* @deprecated Use {@link TetheringManager#TETHER_ERROR_ENTITLEMENT_UNKNOWN}. * @deprecated Use {@link TetheringManager#TETHER_ERROR_ENTITLEMENT_UNKNOWN}.
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
@Deprecated @Deprecated
@ -3534,7 +3534,7 @@ public class ConnectivityManager {
* interface * interface
* *
* @deprecated Use {@link TetheringEventCallback#onError(String, int)} instead. * @deprecated Use {@link TetheringEventCallback#onError(String, int)} instead.
* {@hide} * @hide
*/ */
@RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@ -3599,7 +3599,7 @@ public class ConnectivityManager {
* notify the caller of the result of entitlement check. The listener may be called zero * notify the caller of the result of entitlement check. The listener may be called zero
* or one time. * or one time.
* @deprecated Use {@link TetheringManager#requestLatestTetheringEntitlementResult} instead. * @deprecated Use {@link TetheringManager#requestLatestTetheringEntitlementResult} instead.
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
@Deprecated @Deprecated
@ -3635,7 +3635,7 @@ public class ConnectivityManager {
* @param networkType The type of network you want to report on * @param networkType The type of network you want to report on
* @param percentage The quality of the connection 0 is bad, 100 is good * @param percentage The quality of the connection 0 is bad, 100 is good
* @deprecated Types are deprecated. Use {@link #reportNetworkConnectivity} instead. * @deprecated Types are deprecated. Use {@link #reportNetworkConnectivity} instead.
* {@hide} * @hide
*/ */
public void reportInetCondition(int networkType, int percentage) { public void reportInetCondition(int networkType, int percentage) {
printStackTrace(); printStackTrace();

View file

@ -36,7 +36,10 @@ public class DhcpInfo implements Parcelable {
super(); super();
} }
/** copy constructor {@hide} */ /**
* copy constructor
* @hide
*/
public DhcpInfo(DhcpInfo source) { public DhcpInfo(DhcpInfo source) {
if (source != null) { if (source != null) {
ipAddress = source.ipAddress; ipAddress = source.ipAddress;

View file

@ -54,7 +54,7 @@ import android.os.UserHandle;
* Interface that answers queries about, and allows changing, the * Interface that answers queries about, and allows changing, the
* state of network connectivity. * state of network connectivity.
*/ */
/** {@hide} */ /** @hide */
interface IConnectivityManager interface IConnectivityManager
{ {
Network getActiveNetwork(); Network getActiveNetwork();

View file

@ -22,7 +22,7 @@ import android.net.Network;
/** /**
* A pair of Network and NetworkAgentRegistry. * A pair of Network and NetworkAgentRegistry.
* *
* {@hide} * @hide
*/ */
@JavaDerive(toString=true) @JavaDerive(toString=true)
parcelable NetworkAndAgentRegistryParcelable { parcelable NetworkAndAgentRegistryParcelable {

View file

@ -178,7 +178,7 @@ public class NetworkInfo implements Parcelable {
mState = State.UNKNOWN; mState = State.UNKNOWN;
} }
/** {@hide} */ /** @hide */
@UnsupportedAppUsage @UnsupportedAppUsage
public NetworkInfo(@NonNull NetworkInfo source) { public NetworkInfo(@NonNull NetworkInfo source) {
// S- didn't use to crash when passing null. This plants a timebomb where mState and // S- didn't use to crash when passing null. This plants a timebomb where mState and
@ -445,7 +445,7 @@ public class NetworkInfo implements Parcelable {
/** /**
* @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING} instead. * @deprecated Use {@link NetworkCapabilities#NET_CAPABILITY_NOT_ROAMING} instead.
* {@hide} * @hide
*/ */
@VisibleForTesting @VisibleForTesting
@Deprecated @Deprecated

View file

@ -39,7 +39,7 @@ import java.util.TreeSet;
/** /**
* Native methods for managing network interfaces. * Native methods for managing network interfaces.
* *
* {@hide} * @hide
*/ */
public class NetworkUtils { public class NetworkUtils {
static { static {

View file

@ -35,7 +35,7 @@ import java.util.concurrent.Executor;
* <li>A network specific issue occurs. eg. Congestion on a carrier network.</li> * <li>A network specific issue occurs. eg. Congestion on a carrier network.</li>
* <li>The network registered with the callback has no associated QoS providers</li> * <li>The network registered with the callback has no associated QoS providers</li>
* </ul> * </ul>
* {@hide} * @hide
*/ */
@SystemApi @SystemApi
public abstract class QosCallback { public abstract class QosCallback {

View file

@ -60,32 +60,32 @@ public final class QosCallbackException extends Exception {
// The constants are used for the sendQosCallbackError system API, so they must not be changed // The constants are used for the sendQosCallbackError system API, so they must not be changed
// as there may be callers relying on their historical values to call that API. // as there may be callers relying on their historical values to call that API.
// TODO: mark the constants as @SystemApi, since they are necessary to call a system API. // TODO: mark the constants as @SystemApi, since they are necessary to call a system API.
/** {@hide} */ /** @hide */
public static final int EX_TYPE_FILTER_NONE = 0; public static final int EX_TYPE_FILTER_NONE = 0;
/** {@hide} */ /** @hide */
public static final int EX_TYPE_FILTER_NETWORK_RELEASED = 1; public static final int EX_TYPE_FILTER_NETWORK_RELEASED = 1;
/** {@hide} */ /** @hide */
public static final int EX_TYPE_FILTER_SOCKET_NOT_BOUND = 2; public static final int EX_TYPE_FILTER_SOCKET_NOT_BOUND = 2;
/** {@hide} */ /** @hide */
public static final int EX_TYPE_FILTER_NOT_SUPPORTED = 3; public static final int EX_TYPE_FILTER_NOT_SUPPORTED = 3;
/** {@hide} */ /** @hide */
public static final int EX_TYPE_FILTER_SOCKET_LOCAL_ADDRESS_CHANGED = 4; public static final int EX_TYPE_FILTER_SOCKET_LOCAL_ADDRESS_CHANGED = 4;
/** {@hide} */ /** @hide */
public static final int EX_TYPE_FILTER_SOCKET_NOT_CONNECTED = 5; public static final int EX_TYPE_FILTER_SOCKET_NOT_CONNECTED = 5;
/** {@hide} */ /** @hide */
public static final int EX_TYPE_FILTER_SOCKET_REMOTE_ADDRESS_CHANGED = 6; public static final int EX_TYPE_FILTER_SOCKET_REMOTE_ADDRESS_CHANGED = 6;
/** /**
* Creates exception based off of a type and message. Not all types of exceptions accept a * Creates exception based off of a type and message. Not all types of exceptions accept a
* custom message. * custom message.
* *
* {@hide} * @hide
*/ */
@NonNull @NonNull
public static QosCallbackException createException(@ExceptionType final int type) { public static QosCallbackException createException(@ExceptionType final int type) {

Some files were not shown because too many files have changed in this diff Show more