Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d717c04b authored by Mathew Inwood's avatar Mathew Inwood Committed by Gerrit Code Review
Browse files

Merge "Add @UnsupportedAppUsage annotations"

parents 348a7e73 fa3a7466
Loading
Loading
Loading
Loading
+0 −409

File changed.

Preview size limit exceeded, changes collapsed.

+0 −158
Original line number Diff line number Diff line
@@ -79,23 +79,7 @@ Landroid/media/tv/ITvRemoteServiceInput;->sendPointerDown(Landroid/os/IBinder;II
Landroid/media/tv/ITvRemoteServiceInput;->sendPointerSync(Landroid/os/IBinder;)V
Landroid/media/tv/ITvRemoteServiceInput;->sendPointerUp(Landroid/os/IBinder;I)V
Landroid/media/tv/ITvRemoteServiceInput;->sendTimestamp(Landroid/os/IBinder;J)V
Landroid/net/ConnectivityManager$PacketKeepalive;->stop()V
Landroid/net/ConnectivityManager$PacketKeepaliveCallback;-><init>()V
Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onError(I)V
Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStarted()V
Landroid/net/ConnectivityManager$PacketKeepaliveCallback;->onStopped()V
Landroid/net/ConnectivityManager;->getActiveNetworkQuotaInfo()Landroid/net/NetworkQuotaInfo;
Landroid/net/ConnectivityManager;->setAirplaneMode(Z)V
Landroid/net/ConnectivityManager;->startNattKeepalive(Landroid/net/Network;ILandroid/net/ConnectivityManager$PacketKeepaliveCallback;Ljava/net/InetAddress;ILjava/net/InetAddress;)Landroid/net/ConnectivityManager$PacketKeepalive;
Landroid/net/ConnectivityManager;->tether(Ljava/lang/String;)I
Landroid/net/ConnectivityManager;->untether(Ljava/lang/String;)I
Landroid/net/DhcpResults;-><init>()V
Landroid/net/DhcpResults;-><init>(Landroid/net/DhcpResults;)V
Landroid/net/DhcpResults;-><init>(Landroid/net/StaticIpConfiguration;)V
Landroid/net/DhcpResults;->leaseDuration:I
Landroid/net/DhcpResults;->mtu:I
Landroid/net/DhcpResults;->serverAddress:Ljava/net/Inet4Address;
Landroid/net/DhcpResults;->vendorInfo:Ljava/lang/String;
Landroid/net/IConnectivityManager;->getAllNetworkState()[Landroid/net/NetworkState;
Landroid/net/INetd$Stub;->asInterface(Landroid/os/IBinder;)Landroid/net/INetd;
Landroid/net/INetd;->interfaceAddAddress(Ljava/lang/String;Ljava/lang/String;I)V
@@ -104,149 +88,7 @@ Landroid/net/INetworkStatsService$Stub;->asInterface(Landroid/os/IBinder;)Landro
Landroid/net/INetworkStatsSession;->getHistoryForNetwork(Landroid/net/NetworkTemplate;I)Landroid/net/NetworkStatsHistory;
Landroid/net/INetworkStatsSession;->getHistoryForUid(Landroid/net/NetworkTemplate;IIII)Landroid/net/NetworkStatsHistory;
Landroid/net/InterfaceConfiguration;-><init>()V
Landroid/net/InterfaceConfiguration;->setLinkAddress(Landroid/net/LinkAddress;)V
Landroid/net/LinkAddress;-><init>(Ljava/lang/String;)V
Landroid/net/LinkAddress;-><init>(Ljava/net/InetAddress;I)V
Landroid/net/LinkAddress;->isIPv6()Z
Landroid/net/LinkAddress;->isSameAddressAs(Landroid/net/LinkAddress;)Z
Landroid/net/LinkProperties$ProvisioningChange;->GAINED_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
Landroid/net/LinkProperties$ProvisioningChange;->LOST_PROVISIONING:Landroid/net/LinkProperties$ProvisioningChange;
Landroid/net/LinkProperties$ProvisioningChange;->STILL_NOT_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
Landroid/net/LinkProperties$ProvisioningChange;->STILL_PROVISIONED:Landroid/net/LinkProperties$ProvisioningChange;
Landroid/net/LinkProperties$ProvisioningChange;->values()[Landroid/net/LinkProperties$ProvisioningChange;
Landroid/net/LinkProperties;-><init>()V
Landroid/net/LinkProperties;-><init>(Landroid/net/LinkProperties;)V
Landroid/net/LinkProperties;->addDnsServer(Ljava/net/InetAddress;)Z
Landroid/net/LinkProperties;->addRoute(Landroid/net/RouteInfo;)Z
Landroid/net/LinkProperties;->addStackedLink(Landroid/net/LinkProperties;)Z
Landroid/net/LinkProperties;->clear()V
Landroid/net/LinkProperties;->compareProvisioning(Landroid/net/LinkProperties;Landroid/net/LinkProperties;)Landroid/net/LinkProperties$ProvisioningChange;
Landroid/net/LinkProperties;->getAllInterfaceNames()Ljava/util/List;
Landroid/net/LinkProperties;->getAllRoutes()Ljava/util/List;
Landroid/net/LinkProperties;->getMtu()I
Landroid/net/LinkProperties;->getStackedLinks()Ljava/util/List;
Landroid/net/LinkProperties;->hasGlobalIPv6Address()Z
Landroid/net/LinkProperties;->hasIPv4Address()Z
Landroid/net/LinkProperties;->hasIPv4DefaultRoute()Z
Landroid/net/LinkProperties;->hasIPv4DnsServer()Z
Landroid/net/LinkProperties;->hasIPv6DefaultRoute()Z
Landroid/net/LinkProperties;->hasIPv6DnsServer()Z
Landroid/net/LinkProperties;->isIdenticalAddresses(Landroid/net/LinkProperties;)Z
Landroid/net/LinkProperties;->isIdenticalDnses(Landroid/net/LinkProperties;)Z
Landroid/net/LinkProperties;->isIdenticalRoutes(Landroid/net/LinkProperties;)Z
Landroid/net/LinkProperties;->isIdenticalStackedLinks(Landroid/net/LinkProperties;)Z
Landroid/net/LinkProperties;->isIPv6Provisioned()Z
Landroid/net/LinkProperties;->isProvisioned()Z
Landroid/net/LinkProperties;->isReachable(Ljava/net/InetAddress;)Z
Landroid/net/LinkProperties;->removeDnsServer(Ljava/net/InetAddress;)Z
Landroid/net/LinkProperties;->removeRoute(Landroid/net/RouteInfo;)Z
Landroid/net/LinkProperties;->setDnsServers(Ljava/util/Collection;)V
Landroid/net/LinkProperties;->setDomains(Ljava/lang/String;)V
Landroid/net/LinkProperties;->setInterfaceName(Ljava/lang/String;)V
Landroid/net/LinkProperties;->setLinkAddresses(Ljava/util/Collection;)V
Landroid/net/LinkProperties;->setMtu(I)V
Landroid/net/LinkProperties;->setTcpBufferSizes(Ljava/lang/String;)V
Landroid/net/MacAddress;->ALL_ZEROS_ADDRESS:Landroid/net/MacAddress;
Landroid/net/metrics/ApfProgramEvent;-><init>()V
Landroid/net/metrics/ApfProgramEvent;->actualLifetime:J
Landroid/net/metrics/ApfProgramEvent;->currentRas:I
Landroid/net/metrics/ApfProgramEvent;->filteredRas:I
Landroid/net/metrics/ApfProgramEvent;->flags:I
Landroid/net/metrics/ApfProgramEvent;->flagsFor(ZZ)I
Landroid/net/metrics/ApfProgramEvent;->lifetime:J
Landroid/net/metrics/ApfProgramEvent;->programLength:I
Landroid/net/metrics/ApfStats;-><init>()V
Landroid/net/metrics/ApfStats;->droppedRas:I
Landroid/net/metrics/ApfStats;->durationMs:J
Landroid/net/metrics/ApfStats;->matchingRas:I
Landroid/net/metrics/ApfStats;->maxProgramSize:I
Landroid/net/metrics/ApfStats;->parseErrors:I
Landroid/net/metrics/ApfStats;->programUpdates:I
Landroid/net/metrics/ApfStats;->programUpdatesAll:I
Landroid/net/metrics/ApfStats;->programUpdatesAllowingMulticast:I
Landroid/net/metrics/ApfStats;->receivedRas:I
Landroid/net/metrics/ApfStats;->zeroLifetimeRas:I
Landroid/net/metrics/DhcpClientEvent;-><init>(Ljava/lang/String;I)V
Landroid/net/metrics/DhcpErrorEvent;-><init>(I)V
Landroid/net/metrics/DhcpErrorEvent;->BOOTP_TOO_SHORT:I
Landroid/net/metrics/DhcpErrorEvent;->BUFFER_UNDERFLOW:I
Landroid/net/metrics/DhcpErrorEvent;->DHCP_BAD_MAGIC_COOKIE:I
Landroid/net/metrics/DhcpErrorEvent;->DHCP_INVALID_OPTION_LENGTH:I
Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_COOKIE:I
Landroid/net/metrics/DhcpErrorEvent;->DHCP_NO_MSG_TYPE:I
Landroid/net/metrics/DhcpErrorEvent;->DHCP_UNKNOWN_MSG_TYPE:I
Landroid/net/metrics/DhcpErrorEvent;->errorCodeWithOption(II)I
Landroid/net/metrics/DhcpErrorEvent;->L2_TOO_SHORT:I
Landroid/net/metrics/DhcpErrorEvent;->L2_WRONG_ETH_TYPE:I
Landroid/net/metrics/DhcpErrorEvent;->L3_INVALID_IP:I
Landroid/net/metrics/DhcpErrorEvent;->L3_NOT_IPV4:I
Landroid/net/metrics/DhcpErrorEvent;->L3_TOO_SHORT:I
Landroid/net/metrics/DhcpErrorEvent;->L4_NOT_UDP:I
Landroid/net/metrics/DhcpErrorEvent;->L4_WRONG_PORT:I
Landroid/net/metrics/DhcpErrorEvent;->PARSING_ERROR:I
Landroid/net/metrics/DhcpErrorEvent;->RECEIVE_ERROR:I
Landroid/net/metrics/IpConnectivityLog;-><init>()V
Landroid/net/metrics/IpConnectivityLog;->log(Landroid/os/Parcelable;)Z
Landroid/net/metrics/IpConnectivityLog;->log(Ljava/lang/String;Landroid/os/Parcelable;)Z
Landroid/net/metrics/IpManagerEvent;-><init>(IJ)V
Landroid/net/metrics/IpReachabilityEvent;-><init>(I)V
Landroid/net/metrics/IpReachabilityEvent;->nudFailureEventType(ZZ)I
Landroid/net/metrics/RaEvent$Builder;-><init>()V
Landroid/net/metrics/RaEvent$Builder;->build()Landroid/net/metrics/RaEvent;
Landroid/net/metrics/RaEvent$Builder;->updateDnsslLifetime(J)Landroid/net/metrics/RaEvent$Builder;
Landroid/net/metrics/RaEvent$Builder;->updatePrefixPreferredLifetime(J)Landroid/net/metrics/RaEvent$Builder;
Landroid/net/metrics/RaEvent$Builder;->updatePrefixValidLifetime(J)Landroid/net/metrics/RaEvent$Builder;
Landroid/net/metrics/RaEvent$Builder;->updateRdnssLifetime(J)Landroid/net/metrics/RaEvent$Builder;
Landroid/net/metrics/RaEvent$Builder;->updateRouteInfoLifetime(J)Landroid/net/metrics/RaEvent$Builder;
Landroid/net/metrics/RaEvent$Builder;->updateRouterLifetime(J)Landroid/net/metrics/RaEvent$Builder;
Landroid/net/Network;-><init>(I)V
Landroid/net/Network;->netId:I
Landroid/net/NetworkCapabilities;->getNetworkSpecifier()Landroid/net/NetworkSpecifier;
Landroid/net/NetworkCapabilities;->getSignalStrength()I
Landroid/net/NetworkCapabilities;->hasSignalStrength()Z
Landroid/net/NetworkCapabilities;->transportNamesOf([I)Ljava/lang/String;
Landroid/net/NetworkQuotaInfo;->getEstimatedBytes()J
Landroid/net/NetworkQuotaInfo;->getHardLimitBytes()J
Landroid/net/NetworkQuotaInfo;->getSoftLimitBytes()J
Landroid/net/NetworkRequest$Builder;->setSignalStrength(I)Landroid/net/NetworkRequest$Builder;
Landroid/net/NetworkRequest;->networkCapabilities:Landroid/net/NetworkCapabilities;
Landroid/net/NetworkState;->network:Landroid/net/Network;
Landroid/net/NetworkStats$Entry;-><init>()V
Landroid/net/NetworkStats$Entry;->iface:Ljava/lang/String;
Landroid/net/NetworkStats$Entry;->rxBytes:J
Landroid/net/NetworkStats$Entry;->rxPackets:J
Landroid/net/NetworkStats$Entry;->set:I
Landroid/net/NetworkStats$Entry;->tag:I
Landroid/net/NetworkStats$Entry;->txBytes:J
Landroid/net/NetworkStats$Entry;->txPackets:J
Landroid/net/NetworkStats$Entry;->uid:I
Landroid/net/NetworkStats;-><init>(JI)V
Landroid/net/NetworkStats;->combineValues(Landroid/net/NetworkStats$Entry;)Landroid/net/NetworkStats;
Landroid/net/NetworkStatsHistory$Entry;->txBytes:J
Landroid/net/NetworkStatsHistory;->getStart()J
Landroid/net/NetworkStatsHistory;->getValues(JJLandroid/net/NetworkStatsHistory$Entry;)Landroid/net/NetworkStatsHistory$Entry;
Landroid/net/NetworkTemplate;->buildTemplateMobileAll(Ljava/lang/String;)Landroid/net/NetworkTemplate;
Landroid/net/NetworkUtils;->attachControlPacketFilter(Ljava/io/FileDescriptor;I)V
Landroid/net/NetworkUtils;->attachDhcpFilter(Ljava/io/FileDescriptor;)V
Landroid/net/NetworkUtils;->attachRaFilter(Ljava/io/FileDescriptor;I)V
Landroid/net/NetworkUtils;->getImplicitNetmask(Ljava/net/Inet4Address;)I
Landroid/net/NetworkUtils;->netmaskToPrefixLength(Ljava/net/Inet4Address;)I
Landroid/net/NetworkUtils;->protectFromVpn(Ljava/io/FileDescriptor;)Z
Landroid/net/RouteInfo;-><init>(Landroid/net/IpPrefix;Ljava/net/InetAddress;Ljava/lang/String;)V
Landroid/net/RouteInfo;->hasGateway()Z
Landroid/net/RouteInfo;->selectBestRoute(Ljava/util/Collection;Ljava/net/InetAddress;)Landroid/net/RouteInfo;
Landroid/net/SntpClient;->getNtpTime()J
Landroid/net/SntpClient;->getNtpTimeReference()J
Landroid/net/SntpClient;->getRoundTripTime()J
Landroid/net/SntpClient;->requestTime(Ljava/lang/String;I)Z
Landroid/net/StaticIpConfiguration;->dnsServers:Ljava/util/ArrayList;
Landroid/net/StaticIpConfiguration;->domains:Ljava/lang/String;
Landroid/net/StaticIpConfiguration;->getRoutes(Ljava/lang/String;)Ljava/util/List;
Landroid/net/StringNetworkSpecifier;->specifier:Ljava/lang/String;
Landroid/net/TrafficStats;->getMobileTcpRxPackets()J
Landroid/net/TrafficStats;->getMobileTcpTxPackets()J
Landroid/net/wifi/WifiInfo;->is5GHz()Z
Landroid/net/wifi/WifiInfo;->score:I
Landroid/os/AsyncResult;-><init>(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Throwable;)V
Landroid/os/AsyncResult;->exception:Ljava/lang/Throwable;
Landroid/os/AsyncResult;->forMessage(Landroid/os/Message;Ljava/lang/Object;Ljava/lang/Throwable;)Landroid/os/AsyncResult;
+52 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.UnsupportedAppUsage;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
@@ -311,6 +312,7 @@ public class ConnectivityManager {
     * @hide
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    @UnsupportedAppUsage
    public static final String INET_CONDITION_ACTION =
            "android.net.conn.INET_CONDITION_ACTION";

@@ -325,6 +327,7 @@ public class ConnectivityManager {
     * @hide
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    @UnsupportedAppUsage
    public static final String ACTION_TETHER_STATE_CHANGED =
            "android.net.conn.TETHER_STATE_CHANGED";

@@ -333,6 +336,7 @@ public class ConnectivityManager {
     * gives a String[] listing all the interfaces configured for
     * tethering and currently available for tethering.
     */
    @UnsupportedAppUsage
    public static final String EXTRA_AVAILABLE_TETHER = "availableArray";

    /**
@@ -347,6 +351,7 @@ public class ConnectivityManager {
     * gives a String[] listing all the interfaces currently tethered
     * (ie, has DHCPv4 support and packets potentially forwarded/NATed)
     */
    @UnsupportedAppUsage
    public static final String EXTRA_ACTIVE_TETHER = "tetherArray";

    /**
@@ -355,6 +360,7 @@ public class ConnectivityManager {
     * failed.  Use {@link #getLastTetherError} to find the error code
     * for any interfaces listed here.
     */
    @UnsupportedAppUsage
    public static final String EXTRA_ERRORED_TETHER = "erroredArray";

    /**
@@ -459,6 +465,7 @@ public class ConnectivityManager {
     * The absence of a connection type.
     * @hide
     */
    @UnsupportedAppUsage
    public static final int TYPE_NONE        = -1;

    /**
@@ -575,6 +582,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static final int TYPE_MOBILE_FOTA = 10;

    /**
@@ -583,6 +591,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static final int TYPE_MOBILE_IMS  = 11;

    /**
@@ -591,6 +600,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static final int TYPE_MOBILE_CBS  = 12;

    /**
@@ -600,6 +610,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static final int TYPE_WIFI_P2P    = 13;

    /**
@@ -608,6 +619,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static final int TYPE_MOBILE_IA = 14;

    /**
@@ -617,6 +629,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static final int TYPE_MOBILE_EMERGENCY = 15;

    /**
@@ -625,6 +638,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static final int TYPE_PROXY = 16;

    /**
@@ -707,6 +721,7 @@ public class ConnectivityManager {
     */
    public static final String PRIVATE_DNS_DEFAULT_MODE_FALLBACK = PRIVATE_DNS_MODE_OPPORTUNISTIC;

    @UnsupportedAppUsage
    private final IConnectivityManager mService;
    /**
     * A kludge to facilitate static access where a Context pointer isn't available, like in the
@@ -743,6 +758,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static String getNetworkTypeName(int type) {
        switch (type) {
          case TYPE_NONE:
@@ -797,6 +813,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @Deprecated
    @UnsupportedAppUsage
    public static boolean isNetworkTypeMobile(int networkType) {
        switch (networkType) {
            case TYPE_MOBILE:
@@ -1010,6 +1027,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL)
    @UnsupportedAppUsage
    public NetworkInfo getActiveNetworkInfoForUid(int uid) {
        return getActiveNetworkInfoForUid(uid, false);
    }
@@ -1107,6 +1125,7 @@ public class ConnectivityManager {
     */
    @Deprecated
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public Network getNetworkForType(int networkType) {
        try {
            return mService.getNetworkForType(networkType);
@@ -1135,6 +1154,7 @@ public class ConnectivityManager {
     * the Networks that applications run by the given user will use by default.
     * @hide
     */
    @UnsupportedAppUsage
    public NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId) {
        try {
            return mService.getDefaultNetworkCapabilitiesForUser(userId);
@@ -1153,6 +1173,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public LinkProperties getActiveLinkProperties() {
        try {
            return mService.getActiveLinkProperties();
@@ -1177,6 +1198,7 @@ public class ConnectivityManager {
     */
    @Deprecated
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public LinkProperties getLinkProperties(int networkType) {
        try {
            return mService.getLinkPropertiesForType(networkType);
@@ -1332,6 +1354,7 @@ public class ConnectivityManager {
        return 1;
    }

    @UnsupportedAppUsage
    private NetworkCapabilities networkCapabilitiesForFeature(int networkType, String feature) {
        if (networkType == TYPE_MOBILE) {
            switch (feature) {
@@ -1495,6 +1518,7 @@ public class ConnectivityManager {
        };
    }

    @UnsupportedAppUsage
    private static final HashMap<NetworkCapabilities, LegacyRequest> sLegacyRequests =
            new HashMap<>();

@@ -1523,6 +1547,7 @@ public class ConnectivityManager {
        Log.d(TAG, "expireRequest with " + ourSeqNum + ", " + sequenceNum);
    }

    @UnsupportedAppUsage
    private NetworkRequest requestNetworkForFeatureLocked(NetworkCapabilities netCap) {
        int delay = -1;
        int type = legacyTypeForNetworkCapabilities(netCap);
@@ -1552,6 +1577,7 @@ public class ConnectivityManager {
        }
    }

    @UnsupportedAppUsage
    private boolean removeRequestForFeature(NetworkCapabilities netCap) {
        final LegacyRequest l;
        synchronized (sLegacyRequests) {
@@ -1619,10 +1645,13 @@ public class ConnectivityManager {
    /** @hide */
    public static class PacketKeepaliveCallback {
        /** The requested keepalive was successfully started. */
        @UnsupportedAppUsage
        public void onStarted() {}
        /** The keepalive was successfully stopped. */
        @UnsupportedAppUsage
        public void onStopped() {}
        /** An error occurred. */
        @UnsupportedAppUsage
        public void onError(int error) {}
    }

@@ -1689,6 +1718,7 @@ public class ConnectivityManager {
            mLooper.quit();
        }

        @UnsupportedAppUsage
        public void stop() {
            try {
                mService.stopKeepalive(mNetwork, mSlot);
@@ -1744,6 +1774,7 @@ public class ConnectivityManager {
     *
     * @hide
     */
    @UnsupportedAppUsage
    public PacketKeepalive startNattKeepalive(
            Network network, int intervalSeconds, PacketKeepaliveCallback callback,
            InetAddress srcAddr, int srcPort, InetAddress dstAddr) {
@@ -1805,6 +1836,7 @@ public class ConnectivityManager {
     *             {@link #bindProcessToNetwork} API.
     */
    @Deprecated
    @UnsupportedAppUsage
    public boolean requestRouteToHostAddress(int networkType, InetAddress hostAddress) {
        checkLegacyRoutingApiAccess();
        try {
@@ -1848,12 +1880,14 @@ public class ConnectivityManager {
     * @hide
     */
    @Deprecated
    @UnsupportedAppUsage
    public void setBackgroundDataSetting(boolean allowBackgroundData) {
        // ignored
    }

    /** {@hide} */
    @Deprecated
    @UnsupportedAppUsage
    public NetworkQuotaInfo getActiveNetworkQuotaInfo() {
        try {
            return mService.getActiveNetworkQuotaInfo();
@@ -1867,6 +1901,7 @@ public class ConnectivityManager {
     * @deprecated Talk to TelephonyManager directly
     */
    @Deprecated
    @UnsupportedAppUsage
    public boolean getMobileDataEnabled() {
        IBinder b = ServiceManager.getService(Context.TELEPHONY_SERVICE);
        if (b != null) {
@@ -1986,6 +2021,7 @@ public class ConnectivityManager {
    }

    /** {@hide} */
    @UnsupportedAppUsage
    public static ConnectivityManager from(Context context) {
        return (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
    }
@@ -2036,6 +2072,7 @@ public class ConnectivityManager {
     * @hide
     */
    @Deprecated
    @UnsupportedAppUsage
    private static ConnectivityManager getInstance() {
        if (getInstanceOrNull() == null) {
            throw new IllegalStateException("No ConnectivityManager yet constructed");
@@ -2052,6 +2089,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public String[] getTetherableIfaces() {
        try {
            return mService.getTetherableIfaces();
@@ -2068,6 +2106,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public String[] getTetheredIfaces() {
        try {
            return mService.getTetheredIfaces();
@@ -2090,6 +2129,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public String[] getTetheringErroredIfaces() {
        try {
            return mService.getTetheringErroredIfaces();
@@ -2136,6 +2176,7 @@ public class ConnectivityManager {
     *
     * {@hide}
     */
    @UnsupportedAppUsage
    public int tether(String iface) {
        try {
            String pkgName = mContext.getOpPackageName();
@@ -2164,6 +2205,7 @@ public class ConnectivityManager {
     *
     * {@hide}
     */
    @UnsupportedAppUsage
    public int untether(String iface) {
        try {
            String pkgName = mContext.getOpPackageName();
@@ -2317,6 +2359,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public String[] getTetherableUsbRegexs() {
        try {
            return mService.getTetherableUsbRegexs();
@@ -2336,6 +2379,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public String[] getTetherableWifiRegexs() {
        try {
            return mService.getTetherableWifiRegexs();
@@ -2355,6 +2399,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public String[] getTetherableBluetoothRegexs() {
        try {
            return mService.getTetherableBluetoothRegexs();
@@ -2380,6 +2425,7 @@ public class ConnectivityManager {
     *
     * {@hide}
     */
    @UnsupportedAppUsage
    public int setUsbTethering(boolean enable) {
        try {
            String pkgName = mContext.getOpPackageName();
@@ -2426,6 +2472,7 @@ public class ConnectivityManager {
     * {@hide}
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public int getLastTetherError(String iface) {
        try {
            return mService.getLastTetherError(iface);
@@ -2579,6 +2626,7 @@ public class ConnectivityManager {
     */
    @Deprecated
    @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE)
    @UnsupportedAppUsage
    public boolean isNetworkSupported(int networkType) {
        try {
            return mService.isNetworkSupported(networkType);
@@ -2680,6 +2728,7 @@ public class ConnectivityManager {
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL)
    @UnsupportedAppUsage
    public void setAirplaneMode(boolean enable) {
        try {
            mService.setAirplaneMode(enable);
@@ -2689,6 +2738,7 @@ public class ConnectivityManager {
    }

    /** {@hide} */
    @UnsupportedAppUsage
    public void registerNetworkFactory(Messenger messenger, String name) {
        try {
            mService.registerNetworkFactory(messenger, name);
@@ -2698,6 +2748,7 @@ public class ConnectivityManager {
    }

    /** {@hide} */
    @UnsupportedAppUsage
    public void unregisterNetworkFactory(Messenger messenger) {
        try {
            mService.unregisterNetworkFactory(messenger);
@@ -3786,6 +3837,7 @@ public class ConnectivityManager {
     * @deprecated This is strictly for legacy usage to support {@link #startUsingNetworkFeature}.
     */
    @Deprecated
    @UnsupportedAppUsage
    public static boolean setProcessDefaultNetworkForHostResolution(Network network) {
        return NetworkUtils.bindProcessToNetworkForHostResolution(
                network == null ? NETID_UNSET : network.netId);
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.net;

import android.annotation.UnsupportedAppUsage;
import android.net.NetworkUtils;
import android.os.Parcel;
import android.text.TextUtils;
@@ -33,25 +34,32 @@ import java.util.Objects;
public class DhcpResults extends StaticIpConfiguration {
    private static final String TAG = "DhcpResults";

    @UnsupportedAppUsage
    public Inet4Address serverAddress;

    /** Vendor specific information (from RFC 2132). */
    @UnsupportedAppUsage
    public String vendorInfo;

    @UnsupportedAppUsage
    public int leaseDuration;

    /** Link MTU option. 0 means unset. */
    @UnsupportedAppUsage
    public int mtu;

    @UnsupportedAppUsage
    public DhcpResults() {
        super();
    }

    @UnsupportedAppUsage
    public DhcpResults(StaticIpConfiguration source) {
        super(source);
    }

    /** copy constructor */
    @UnsupportedAppUsage
    public DhcpResults(DhcpResults source) {
        super(source);

+9 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading