import typing

import android.app
import android.content
import android.net.ipsec.ike
import android.net.wifi
import android.os
import android.util
import java
import java.chaquopy
import java.io
import java.lang
import java.net
import java.security
import java.security.cert
import java.util
import java.util.concurrent
import javax.net
import javax.net.ssl

class CaptivePortal(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[CaptivePortal]] = ...
    def describeContents(self) -> int: ...
    def ignoreNetwork(self) -> None: ...
    def reportCaptivePortalDismissed(self) -> None: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class ConnectivityDiagnosticsManager(java.lang.Object):
    def registerConnectivityDiagnosticsCallback(self, request: NetworkRequest, e: java.util.concurrent.Executor, callback: ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback, /) -> None: ...
    def unregisterConnectivityDiagnosticsCallback(self, callback: ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback, /) -> None: ...

    class DataStallReport(android.os.Parcelable):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ConnectivityDiagnosticsManager.DataStallReport]] = ...
        DETECTION_METHOD_DNS_EVENTS: typing.ClassVar[int] = ...
        DETECTION_METHOD_TCP_METRICS: typing.ClassVar[int] = ...
        KEY_DNS_CONSECUTIVE_TIMEOUTS: typing.ClassVar[str] = ...
        KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS: typing.ClassVar[str] = ...
        KEY_TCP_PACKET_FAIL_RATE: typing.ClassVar[str] = ...
        def __init__(self, network: Network, reportTimestamp: int | java.jlong | java.lang.Long, detectionMethod: int | java.jint | java.lang.Integer, linkProperties: LinkProperties, networkCapabilities: NetworkCapabilities, stallDetails: android.os.PersistableBundle, /) -> None: ...
        def describeContents(self) -> int: ...
        def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getDetectionMethod(self) -> int: ...
        def getLinkProperties(self) -> LinkProperties: ...
        def getNetwork(self) -> Network: ...
        def getNetworkCapabilities(self) -> NetworkCapabilities: ...
        def getReportTimestamp(self) -> int: ...
        def getStallDetails(self) -> android.os.PersistableBundle: ...
        def hashCode(self) -> int: ...
        def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class ConnectivityReport(android.os.Parcelable):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ConnectivityDiagnosticsManager.ConnectivityReport]] = ...
        KEY_NETWORK_PROBES_ATTEMPTED_BITMASK: typing.ClassVar[str] = ...
        KEY_NETWORK_PROBES_SUCCEEDED_BITMASK: typing.ClassVar[str] = ...
        KEY_NETWORK_VALIDATION_RESULT: typing.ClassVar[str] = ...
        NETWORK_PROBE_DNS: typing.ClassVar[int] = ...
        NETWORK_PROBE_FALLBACK: typing.ClassVar[int] = ...
        NETWORK_PROBE_HTTP: typing.ClassVar[int] = ...
        NETWORK_PROBE_HTTPS: typing.ClassVar[int] = ...
        NETWORK_PROBE_PRIVATE_DNS: typing.ClassVar[int] = ...
        NETWORK_VALIDATION_RESULT_INVALID: typing.ClassVar[int] = ...
        NETWORK_VALIDATION_RESULT_PARTIALLY_VALID: typing.ClassVar[int] = ...
        NETWORK_VALIDATION_RESULT_SKIPPED: typing.ClassVar[int] = ...
        NETWORK_VALIDATION_RESULT_VALID: typing.ClassVar[int] = ...
        def __init__(self, network: Network, reportTimestamp: int | java.jlong | java.lang.Long, linkProperties: LinkProperties, networkCapabilities: NetworkCapabilities, additionalInfo: android.os.PersistableBundle, /) -> None: ...
        def describeContents(self) -> int: ...
        def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getAdditionalInfo(self) -> android.os.PersistableBundle: ...
        def getLinkProperties(self) -> LinkProperties: ...
        def getNetwork(self) -> Network: ...
        def getNetworkCapabilities(self) -> NetworkCapabilities: ...
        def getReportTimestamp(self) -> int: ...
        def hashCode(self) -> int: ...
        def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class ConnectivityDiagnosticsCallback(java.lang.Object):
        def __init__(self) -> None: ...
        def onConnectivityReportAvailable(self, report: ConnectivityDiagnosticsManager.ConnectivityReport, /) -> None: ...
        def onDataStallSuspected(self, report: ConnectivityDiagnosticsManager.DataStallReport, /) -> None: ...
        def onNetworkConnectivityReported(self, network: Network, hasConnectivity: bool | java.jboolean | java.lang.Boolean, /) -> None: ...

class ConnectivityManager(java.lang.Object):
    ACTION_BACKGROUND_DATA_SETTING_CHANGED: typing.ClassVar[str] = ...
    ACTION_CAPTIVE_PORTAL_SIGN_IN: typing.ClassVar[str] = ...
    ACTION_RESTRICT_BACKGROUND_CHANGED: typing.ClassVar[str] = ...
    CONNECTIVITY_ACTION: typing.ClassVar[str] = ...
    DEFAULT_NETWORK_PREFERENCE: typing.ClassVar[int] = ...
    EXTRA_CAPTIVE_PORTAL: typing.ClassVar[str] = ...
    EXTRA_CAPTIVE_PORTAL_URL: typing.ClassVar[str] = ...
    EXTRA_EXTRA_INFO: typing.ClassVar[str] = ...
    EXTRA_IS_FAILOVER: typing.ClassVar[str] = ...
    EXTRA_NETWORK: typing.ClassVar[str] = ...
    EXTRA_NETWORK_INFO: typing.ClassVar[str] = ...
    EXTRA_NETWORK_REQUEST: typing.ClassVar[str] = ...
    EXTRA_NETWORK_TYPE: typing.ClassVar[str] = ...
    EXTRA_NO_CONNECTIVITY: typing.ClassVar[str] = ...
    EXTRA_OTHER_NETWORK_INFO: typing.ClassVar[str] = ...
    EXTRA_REASON: typing.ClassVar[str] = ...
    MULTIPATH_PREFERENCE_HANDOVER: typing.ClassVar[int] = ...
    MULTIPATH_PREFERENCE_PERFORMANCE: typing.ClassVar[int] = ...
    MULTIPATH_PREFERENCE_RELIABILITY: typing.ClassVar[int] = ...
    RESTRICT_BACKGROUND_STATUS_DISABLED: typing.ClassVar[int] = ...
    RESTRICT_BACKGROUND_STATUS_ENABLED: typing.ClassVar[int] = ...
    RESTRICT_BACKGROUND_STATUS_WHITELISTED: typing.ClassVar[int] = ...
    TYPE_BLUETOOTH: typing.ClassVar[int] = ...
    TYPE_DUMMY: typing.ClassVar[int] = ...
    TYPE_ETHERNET: typing.ClassVar[int] = ...
    TYPE_MOBILE: typing.ClassVar[int] = ...
    TYPE_MOBILE_DUN: typing.ClassVar[int] = ...
    TYPE_MOBILE_HIPRI: typing.ClassVar[int] = ...
    TYPE_MOBILE_MMS: typing.ClassVar[int] = ...
    TYPE_MOBILE_SUPL: typing.ClassVar[int] = ...
    TYPE_VPN: typing.ClassVar[int] = ...
    TYPE_WIFI: typing.ClassVar[int] = ...
    TYPE_WIMAX: typing.ClassVar[int] = ...
    def addDefaultNetworkActiveListener(self, l: ConnectivityManager.OnNetworkActiveListener, /) -> None: ...
    def bindProcessToNetwork(self, network: Network, /) -> bool: ...
    def createSocketKeepalive(self, network: Network, socket: IpSecManager.UdpEncapsulationSocket, source: java.net.InetAddress, destination: java.net.InetAddress, executor: java.util.concurrent.Executor, callback: SocketKeepalive.Callback, /) -> SocketKeepalive: ...
    def getActiveNetwork(self) -> Network | None: ...
    def getActiveNetworkInfo(self) -> NetworkInfo | None: ...
    def getAllNetworkInfo(self) -> java.chaquopy.JavaArray[NetworkInfo]: ...
    def getAllNetworks(self) -> java.chaquopy.JavaArray[Network]: ...
    def getBackgroundDataSetting(self) -> bool: ...
    def getBoundNetworkForProcess(self) -> Network | None: ...
    def getConnectionOwnerUid(self, protocol: int | java.jint | java.lang.Integer, local: java.net.InetSocketAddress, remote: java.net.InetSocketAddress, /) -> int: ...
    def getDefaultProxy(self) -> ProxyInfo | None: ...
    def getLinkProperties(self, network: Network, /) -> LinkProperties | None: ...
    def getMultipathPreference(self, network: Network, /) -> int: ...
    def getNetworkCapabilities(self, network: Network, /) -> NetworkCapabilities | None: ...
    @typing.overload
    def getNetworkInfo(self, networkType: int | java.jint | java.lang.Integer, /) -> NetworkInfo | None: ...
    @typing.overload
    def getNetworkInfo(self, network: Network, /) -> NetworkInfo | None: ...
    def getNetworkPreference(self) -> int: ...
    def getNetworkWatchlistConfigHash(self) -> java.chaquopy.JavaArrayJByte | None: ...
    @staticmethod
    def getProcessDefaultNetwork() -> Network | None: ...
    def getRestrictBackgroundStatus(self) -> int: ...
    def isActiveNetworkMetered(self) -> bool: ...
    def isDefaultNetworkActive(self) -> bool: ...
    @staticmethod
    def isNetworkTypeValid(networkType: int | java.jint | java.lang.Integer, /) -> bool: ...
    def registerBestMatchingNetworkCallback(self, request: NetworkRequest, networkCallback: ConnectivityManager.NetworkCallback, handler: android.os.Handler, /) -> None: ...
    @typing.overload
    def registerDefaultNetworkCallback(self, networkCallback: ConnectivityManager.NetworkCallback, /) -> None: ...
    @typing.overload
    def registerDefaultNetworkCallback(self, networkCallback: ConnectivityManager.NetworkCallback, handler: android.os.Handler, /) -> None: ...
    @typing.overload
    def registerNetworkCallback(self, request: NetworkRequest, operation: android.app.PendingIntent, /) -> None: ...
    @typing.overload
    def registerNetworkCallback(self, request: NetworkRequest, networkCallback: ConnectivityManager.NetworkCallback, /) -> None: ...
    @typing.overload
    def registerNetworkCallback(self, request: NetworkRequest, networkCallback: ConnectivityManager.NetworkCallback, handler: android.os.Handler, /) -> None: ...
    def releaseNetworkRequest(self, operation: android.app.PendingIntent, /) -> None: ...
    def removeDefaultNetworkActiveListener(self, l: ConnectivityManager.OnNetworkActiveListener, /) -> None: ...
    def reportBadNetwork(self, network: Network, /) -> None: ...
    def reportNetworkConnectivity(self, network: Network, hasConnectivity: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def requestBandwidthUpdate(self, network: Network, /) -> bool: ...
    @typing.overload
    def requestNetwork(self, request: NetworkRequest, operation: android.app.PendingIntent, /) -> None: ...
    @typing.overload
    def requestNetwork(self, request: NetworkRequest, networkCallback: ConnectivityManager.NetworkCallback, /) -> None: ...
    @typing.overload
    def requestNetwork(self, request: NetworkRequest, networkCallback: ConnectivityManager.NetworkCallback, timeoutMs: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def requestNetwork(self, request: NetworkRequest, networkCallback: ConnectivityManager.NetworkCallback, handler: android.os.Handler, /) -> None: ...
    @typing.overload
    def requestNetwork(self, request: NetworkRequest, networkCallback: ConnectivityManager.NetworkCallback, handler: android.os.Handler, timeoutMs: int | java.jint | java.lang.Integer, /) -> None: ...
    def reserveNetwork(self, request: NetworkRequest, handler: android.os.Handler, networkCallback: ConnectivityManager.NetworkCallback, /) -> None: ...
    def setNetworkPreference(self, preference: int | java.jint | java.lang.Integer, /) -> None: ...
    @staticmethod
    def setProcessDefaultNetwork(network: Network, /) -> bool: ...
    @typing.overload
    def unregisterNetworkCallback(self, operation: android.app.PendingIntent, /) -> None: ...
    @typing.overload
    def unregisterNetworkCallback(self, networkCallback: ConnectivityManager.NetworkCallback, /) -> None: ...

    class OnNetworkActiveListener(java.lang.Object):
        def onNetworkActive(self) -> None: ...

    class NetworkCallback(java.lang.Object):
        FLAG_INCLUDE_LOCATION_INFO: typing.ClassVar[int] = ...
        @typing.overload
        def __init__(self) -> None: ...
        @typing.overload
        def __init__(self, flags: int | java.jint | java.lang.Integer, /) -> None: ...
        def onAvailable(self, network: Network, /) -> None: ...
        def onBlockedStatusChanged(self, network: Network, blocked: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
        def onCapabilitiesChanged(self, network: Network, networkCapabilities: NetworkCapabilities, /) -> None: ...
        def onLinkPropertiesChanged(self, network: Network, linkProperties: LinkProperties, /) -> None: ...
        def onLosing(self, network: Network, maxMsToLive: int | java.jint | java.lang.Integer, /) -> None: ...
        def onLost(self, network: Network, /) -> None: ...
        def onReserved(self, networkCapabilities: NetworkCapabilities, /) -> None: ...
        def onUnavailable(self) -> None: ...

class Credentials(java.lang.Object):
    def __init__(self, pid: int | java.jint | java.lang.Integer, uid: int | java.jint | java.lang.Integer, gid: int | java.jint | java.lang.Integer, /) -> None: ...
    def getGid(self) -> int: ...
    def getPid(self) -> int: ...
    def getUid(self) -> int: ...

class DhcpInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[DhcpInfo]] = ...
    dns1: int = ...
    dns2: int = ...
    gateway: int = ...
    ipAddress: int = ...
    leaseDuration: int = ...
    netmask: int = ...
    serverAddress: int = ...
    def __init__(self) -> None: ...
    def describeContents(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...


_DnsResolver__Callback__T = typing.TypeVar('_DnsResolver__Callback__T')  # <T>
class DnsResolver(java.lang.Object):
    CLASS_IN: typing.ClassVar[int] = ...
    ERROR_PARSE: typing.ClassVar[int] = ...
    ERROR_SYSTEM: typing.ClassVar[int] = ...
    FLAG_EMPTY: typing.ClassVar[int] = ...
    FLAG_NO_CACHE_LOOKUP: typing.ClassVar[int] = ...
    FLAG_NO_CACHE_STORE: typing.ClassVar[int] = ...
    FLAG_NO_RETRY: typing.ClassVar[int] = ...
    TYPE_A: typing.ClassVar[int] = ...
    TYPE_AAAA: typing.ClassVar[int] = ...
    @staticmethod
    def getInstance() -> DnsResolver: ...
    @typing.overload
    def query(self, network: Network, domain: str | java.lang.String, flags: int | java.jint | java.lang.Integer, executor: java.util.concurrent.Executor, cancellationSignal: android.os.CancellationSignal, callback: DnsResolver.Callback[java.util.List[java.net.InetAddress]], /) -> None: ...
    @typing.overload
    def query(self, network: Network, domain: str | java.lang.String, nsType: int | java.jint | java.lang.Integer, flags: int | java.jint | java.lang.Integer, executor: java.util.concurrent.Executor, cancellationSignal: android.os.CancellationSignal, callback: DnsResolver.Callback[java.util.List[java.net.InetAddress]], /) -> None: ...
    @typing.overload
    def rawQuery(self, network: Network, query: java.chaquopy.JavaArrayJByte, flags: int | java.jint | java.lang.Integer, executor: java.util.concurrent.Executor, cancellationSignal: android.os.CancellationSignal, callback: DnsResolver.Callback[java.chaquopy.JavaArrayJByte], /) -> None: ...
    @typing.overload
    def rawQuery(self, network: Network, domain: str | java.lang.String, nsClass: int | java.jint | java.lang.Integer, nsType: int | java.jint | java.lang.Integer, flags: int | java.jint | java.lang.Integer, executor: java.util.concurrent.Executor, cancellationSignal: android.os.CancellationSignal, callback: DnsResolver.Callback[java.chaquopy.JavaArrayJByte], /) -> None: ...

    class DnsException(java.lang.Exception):
        code: int = ...
        def __init__(self, code: int | java.jint | java.lang.Integer, cause: java.lang.Throwable, /) -> None: ...
    class Callback(java.lang.Object, typing.Generic[_DnsResolver__Callback__T]):
        def onAnswer(self, arg1: _DnsResolver__Callback__T, arg2: int | java.jint | java.lang.Integer, /) -> None: ...
        def onError(self, arg1: DnsResolver.DnsException, /) -> None: ...

class EthernetNetworkSpecifier(NetworkSpecifier, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[EthernetNetworkSpecifier]] = ...
    def __init__(self, interfaceName: str | java.lang.String, /) -> None: ...
    def canBeSatisfiedBy(self, other: NetworkSpecifier, /) -> bool: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getInterfaceName(self) -> str | None: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class Ikev2VpnProfile(PlatformVpnProfile):
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAllowedAlgorithms(self) -> java.util.List[java.lang.String]: ...
    def getIkeTunnelConnectionParams(self) -> android.net.ipsec.ike.IkeTunnelConnectionParams | None: ...
    def getMaxMtu(self) -> int: ...
    def getPassword(self) -> str | None: ...
    def getPresharedKey(self) -> java.chaquopy.JavaArrayJByte | None: ...
    def getProxyInfo(self) -> ProxyInfo | None: ...
    def getRsaPrivateKey(self) -> java.security.PrivateKey | None: ...
    def getServerAddr(self) -> str: ...
    def getServerRootCaCert(self) -> java.security.cert.X509Certificate | None: ...
    def getUserCert(self) -> java.security.cert.X509Certificate | None: ...
    def getUserIdentity(self) -> str: ...
    def getUsername(self) -> str | None: ...
    def hashCode(self) -> int: ...
    def isAutomaticIpVersionSelectionEnabled(self) -> bool: ...
    def isAutomaticNattKeepaliveTimerEnabled(self) -> bool: ...
    def isBypassable(self) -> bool: ...
    def isMetered(self) -> bool: ...
    def toString(self) -> str: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, ikeTunConnParams: android.net.ipsec.ike.IkeTunnelConnectionParams, /) -> None: ...
        @typing.overload
        def __init__(self, serverAddr: str | java.lang.String, identity: str | java.lang.String, /) -> None: ...
        def build(self) -> Ikev2VpnProfile: ...
        def setAllowedAlgorithms(self, algorithmNames: java.util.List[java.lang.String], /) -> Ikev2VpnProfile.Builder: ...
        def setAuthDigitalSignature(self, userCert: java.security.cert.X509Certificate, key: java.security.PrivateKey, serverRootCa: java.security.cert.X509Certificate, /) -> Ikev2VpnProfile.Builder: ...
        def setAuthPsk(self, psk: java.chaquopy.JavaArrayJByte, /) -> Ikev2VpnProfile.Builder: ...
        def setAuthUsernamePassword(self, user: str | java.lang.String, pass_: str | java.lang.String, serverRootCa: java.security.cert.X509Certificate, /) -> Ikev2VpnProfile.Builder: ...
        def setAutomaticIpVersionSelectionEnabled(self, isEnabled: bool | java.jboolean | java.lang.Boolean, /) -> Ikev2VpnProfile.Builder: ...
        def setAutomaticNattKeepaliveTimerEnabled(self, isEnabled: bool | java.jboolean | java.lang.Boolean, /) -> Ikev2VpnProfile.Builder: ...
        def setBypassable(self, isBypassable: bool | java.jboolean | java.lang.Boolean, /) -> Ikev2VpnProfile.Builder: ...
        def setLocalRoutesExcluded(self, excludeLocalRoutes: bool | java.jboolean | java.lang.Boolean, /) -> Ikev2VpnProfile.Builder: ...
        def setMaxMtu(self, mtu: int | java.jint | java.lang.Integer, /) -> Ikev2VpnProfile.Builder: ...
        def setMetered(self, isMetered: bool | java.jboolean | java.lang.Boolean, /) -> Ikev2VpnProfile.Builder: ...
        def setProxy(self, proxy: ProxyInfo, /) -> Ikev2VpnProfile.Builder: ...
        def setRequiresInternetValidation(self, requiresInternetValidation: bool | java.jboolean | java.lang.Boolean, /) -> Ikev2VpnProfile.Builder: ...

class InetAddresses(java.lang.Object):
    @staticmethod
    def isNumericAddress(address: str | java.lang.String, /) -> bool: ...
    @staticmethod
    def parseNumericAddress(address: str | java.lang.String, /) -> java.net.InetAddress: ...

class IpConfiguration(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[IpConfiguration]] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getHttpProxy(self) -> ProxyInfo | None: ...
    def getStaticIpConfiguration(self) -> StaticIpConfiguration | None: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> IpConfiguration: ...
        def setHttpProxy(self, proxyInfo: ProxyInfo, /) -> IpConfiguration.Builder: ...
        def setStaticIpConfiguration(self, config: StaticIpConfiguration, /) -> IpConfiguration.Builder: ...

class IpPrefix(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[IpPrefix]] = ...
    def __init__(self, address: java.net.InetAddress, prefixLength: int | java.jint | java.lang.Integer, /) -> None: ...
    def contains(self, address: java.net.InetAddress, /) -> bool: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAddress(self) -> java.net.InetAddress: ...
    def getPrefixLength(self) -> int: ...
    def getRawAddress(self) -> java.chaquopy.JavaArrayJByte: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class IpSecAlgorithm(android.os.Parcelable):
    AUTH_AES_CMAC: typing.ClassVar[str] = ...
    AUTH_AES_XCBC: typing.ClassVar[str] = ...
    AUTH_CRYPT_AES_GCM: typing.ClassVar[str] = ...
    AUTH_CRYPT_CHACHA20_POLY1305: typing.ClassVar[str] = ...
    AUTH_HMAC_MD5: typing.ClassVar[str] = ...
    AUTH_HMAC_SHA1: typing.ClassVar[str] = ...
    AUTH_HMAC_SHA256: typing.ClassVar[str] = ...
    AUTH_HMAC_SHA384: typing.ClassVar[str] = ...
    AUTH_HMAC_SHA512: typing.ClassVar[str] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[IpSecAlgorithm]] = ...
    CRYPT_AES_CBC: typing.ClassVar[str] = ...
    CRYPT_AES_CTR: typing.ClassVar[str] = ...
    @typing.overload
    def __init__(self, algorithm: str | java.lang.String, key: java.chaquopy.JavaArrayJByte, /) -> None: ...
    @typing.overload
    def __init__(self, algorithm: str | java.lang.String, key: java.chaquopy.JavaArrayJByte, truncLenBits: int | java.jint | java.lang.Integer, /) -> None: ...
    def describeContents(self) -> int: ...
    def getKey(self) -> java.chaquopy.JavaArrayJByte: ...
    def getName(self) -> str: ...
    @staticmethod
    def getSupportedAlgorithms() -> java.util.Set[java.lang.String]: ...
    def getTruncationLengthBits(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class IpSecManager(java.lang.Object):
    DIRECTION_IN: typing.ClassVar[int] = ...
    DIRECTION_OUT: typing.ClassVar[int] = ...
    @typing.overload
    def allocateSecurityParameterIndex(self, destinationAddress: java.net.InetAddress, /) -> IpSecManager.SecurityParameterIndex: ...
    @typing.overload
    def allocateSecurityParameterIndex(self, destinationAddress: java.net.InetAddress, requestedSpi: int | java.jint | java.lang.Integer, /) -> IpSecManager.SecurityParameterIndex: ...
    @typing.overload
    def applyTransportModeTransform(self, socket: java.io.FileDescriptor, direction: int | java.jint | java.lang.Integer, transform: IpSecTransform, /) -> None: ...
    @typing.overload
    def applyTransportModeTransform(self, socket: java.net.DatagramSocket, direction: int | java.jint | java.lang.Integer, transform: IpSecTransform, /) -> None: ...
    @typing.overload
    def applyTransportModeTransform(self, socket: java.net.Socket, direction: int | java.jint | java.lang.Integer, transform: IpSecTransform, /) -> None: ...
    @typing.overload
    def openUdpEncapsulationSocket(self) -> IpSecManager.UdpEncapsulationSocket: ...
    @typing.overload
    def openUdpEncapsulationSocket(self, port: int | java.jint | java.lang.Integer, /) -> IpSecManager.UdpEncapsulationSocket: ...
    @typing.overload
    def removeTransportModeTransforms(self, socket: java.io.FileDescriptor, /) -> None: ...
    @typing.overload
    def removeTransportModeTransforms(self, socket: java.net.DatagramSocket, /) -> None: ...
    @typing.overload
    def removeTransportModeTransforms(self, socket: java.net.Socket, /) -> None: ...

    class UdpEncapsulationSocket(java.lang.AutoCloseable):
        def close(self) -> None: ...
        def finalize(self) -> None: ...
        def getFileDescriptor(self) -> java.io.FileDescriptor: ...
        def getPort(self) -> int: ...
        def toString(self) -> str: ...

    class SpiUnavailableException(android.util.AndroidException):
        def getSpi(self) -> int: ...

    class SecurityParameterIndex(java.lang.AutoCloseable):
        def close(self) -> None: ...
        def finalize(self) -> None: ...
        def getSpi(self) -> int: ...
        def toString(self) -> str: ...

    class ResourceUnavailableException(android.util.AndroidException): ...

class IpSecTransform(java.lang.AutoCloseable):
    def close(self) -> None: ...
    def equals(self, other: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def finalize(self) -> None: ...
    def requestIpSecTransformState(self, executor: java.util.concurrent.Executor, callback: android.os.OutcomeReceiver[IpSecTransformState, java.lang.RuntimeException], /) -> None: ...
    def toString(self) -> str: ...

    class Builder(java.lang.Object):
        def __init__(self, context: android.content.Context, /) -> None: ...
        def buildTransportModeTransform(self, sourceAddress: java.net.InetAddress, spi: IpSecManager.SecurityParameterIndex, /) -> IpSecTransform: ...
        def setAuthenticatedEncryption(self, algo: IpSecAlgorithm, /) -> IpSecTransform.Builder: ...
        def setAuthentication(self, algo: IpSecAlgorithm, /) -> IpSecTransform.Builder: ...
        def setEncryption(self, algo: IpSecAlgorithm, /) -> IpSecTransform.Builder: ...
        def setIpv4Encapsulation(self, localSocket: IpSecManager.UdpEncapsulationSocket, remotePort: int | java.jint | java.lang.Integer, /) -> IpSecTransform.Builder: ...

class IpSecTransformState(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[IpSecTransformState]] = ...
    def describeContents(self) -> int: ...
    def getByteCount(self) -> int: ...
    def getPacketCount(self) -> int: ...
    def getReplayBitmap(self) -> java.chaquopy.JavaArrayJByte: ...
    def getRxHighestSequenceNumber(self) -> int: ...
    def getTimestampMillis(self) -> int: ...
    def getTxHighestSequenceNumber(self) -> int: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> IpSecTransformState: ...
        def setByteCount(self, byteCount: int | java.jlong | java.lang.Long, /) -> IpSecTransformState.Builder: ...
        def setPacketCount(self, packetCount: int | java.jlong | java.lang.Long, /) -> IpSecTransformState.Builder: ...
        def setReplayBitmap(self, bitMap: java.chaquopy.JavaArrayJByte, /) -> IpSecTransformState.Builder: ...
        def setRxHighestSequenceNumber(self, seqNum: int | java.jlong | java.lang.Long, /) -> IpSecTransformState.Builder: ...
        def setTimestampMillis(self, timestamp: int | java.jlong | java.lang.Long, /) -> IpSecTransformState.Builder: ...
        def setTxHighestSequenceNumber(self, seqNum: int | java.jlong | java.lang.Long, /) -> IpSecTransformState.Builder: ...

class L2capNetworkSpecifier(NetworkSpecifier, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[L2capNetworkSpecifier]] = ...
    HEADER_COMPRESSION_6LOWPAN: typing.ClassVar[int] = ...
    HEADER_COMPRESSION_ANY: typing.ClassVar[int] = ...
    HEADER_COMPRESSION_NONE: typing.ClassVar[int] = ...
    PSM_ANY: typing.ClassVar[int] = ...
    ROLE_ANY: typing.ClassVar[int] = ...
    ROLE_CLIENT: typing.ClassVar[int] = ...
    ROLE_SERVER: typing.ClassVar[int] = ...
    def canBeSatisfiedBy(self, other: NetworkSpecifier, /) -> bool: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getHeaderCompression(self) -> int: ...
    def getPsm(self) -> int: ...
    def getRemoteAddress(self) -> MacAddress: ...
    def getRole(self) -> int: ...
    def hashCode(self) -> int: ...
    def redact(self) -> NetworkSpecifier: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> L2capNetworkSpecifier: ...
        def setHeaderCompression(self, headerCompression: int | java.jint | java.lang.Integer, /) -> L2capNetworkSpecifier.Builder: ...
        def setPsm(self, psm: int | java.jint | java.lang.Integer, /) -> L2capNetworkSpecifier.Builder: ...
        def setRemoteAddress(self, remoteAddress: MacAddress, /) -> L2capNetworkSpecifier.Builder: ...
        def setRole(self, role: int | java.jint | java.lang.Integer, /) -> L2capNetworkSpecifier.Builder: ...

class LinkAddress(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[LinkAddress]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAddress(self) -> java.net.InetAddress: ...
    def getFlags(self) -> int: ...
    def getPrefixLength(self) -> int: ...
    def getScope(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class LinkProperties(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[LinkProperties]] = ...
    def __init__(self) -> None: ...
    def addRoute(self, route: RouteInfo, /) -> bool: ...
    def clear(self) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDhcpServerAddress(self) -> java.net.Inet4Address | None: ...
    def getDnsServers(self) -> java.util.List[java.net.InetAddress]: ...
    def getDomains(self) -> str | None: ...
    def getHttpProxy(self) -> ProxyInfo | None: ...
    def getInterfaceName(self) -> str | None: ...
    def getLinkAddresses(self) -> java.util.List[LinkAddress]: ...
    def getMtu(self) -> int: ...
    def getNat64Prefix(self) -> IpPrefix | None: ...
    def getPrivateDnsServerName(self) -> str | None: ...
    def getRoutes(self) -> java.util.List[RouteInfo]: ...
    def hashCode(self) -> int: ...
    def isPrivateDnsActive(self) -> bool: ...
    def isWakeOnLanSupported(self) -> bool: ...
    def setDhcpServerAddress(self, serverAddress: java.net.Inet4Address, /) -> None: ...
    def setDnsServers(self, dnsServers: java.util.Collection[java.net.InetAddress], /) -> None: ...
    def setDomains(self, domains: str | java.lang.String, /) -> None: ...
    def setHttpProxy(self, proxy: ProxyInfo, /) -> None: ...
    def setInterfaceName(self, iface: str | java.lang.String, /) -> None: ...
    def setLinkAddresses(self, addresses: java.util.Collection[LinkAddress], /) -> None: ...
    def setMtu(self, mtu: int | java.jint | java.lang.Integer, /) -> None: ...
    def setNat64Prefix(self, prefix: IpPrefix, /) -> None: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class LocalServerSocket(java.io.Closeable):
    @typing.overload
    def __init__(self, fd: java.io.FileDescriptor, /) -> None: ...
    @typing.overload
    def __init__(self, name: str | java.lang.String, /) -> None: ...
    def accept(self) -> LocalSocket: ...
    def close(self) -> None: ...
    def getFileDescriptor(self) -> java.io.FileDescriptor | None: ...
    def getLocalSocketAddress(self) -> LocalSocketAddress: ...

class LocalSocket(java.io.Closeable):
    SOCKET_DGRAM: typing.ClassVar[int] = ...
    SOCKET_SEQPACKET: typing.ClassVar[int] = ...
    SOCKET_STREAM: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, sockType: int | java.jint | java.lang.Integer, /) -> None: ...
    def bind(self, bindpoint: LocalSocketAddress, /) -> None: ...
    def close(self) -> None: ...
    @typing.overload
    def connect(self, endpoint: LocalSocketAddress, /) -> None: ...
    @typing.overload
    def connect(self, endpoint: LocalSocketAddress, timeout: int | java.jint | java.lang.Integer, /) -> None: ...
    def getAncillaryFileDescriptors(self) -> java.chaquopy.JavaArray[java.io.FileDescriptor]: ...
    def getFileDescriptor(self) -> java.io.FileDescriptor | None: ...
    def getInputStream(self) -> java.io.InputStream: ...
    def getLocalSocketAddress(self) -> LocalSocketAddress | None: ...
    def getOutputStream(self) -> java.io.OutputStream: ...
    def getPeerCredentials(self) -> Credentials: ...
    def getReceiveBufferSize(self) -> int: ...
    def getRemoteSocketAddress(self) -> LocalSocketAddress: ...
    def getSendBufferSize(self) -> int: ...
    def getSoTimeout(self) -> int: ...
    def isBound(self) -> bool: ...
    def isClosed(self) -> bool: ...
    def isConnected(self) -> bool: ...
    def isInputShutdown(self) -> bool: ...
    def isOutputShutdown(self) -> bool: ...
    def setFileDescriptorsForSend(self, fds: java.chaquopy.JavaArray[java.io.FileDescriptor], /) -> None: ...
    def setReceiveBufferSize(self, size: int | java.jint | java.lang.Integer, /) -> None: ...
    def setSendBufferSize(self, n: int | java.jint | java.lang.Integer, /) -> None: ...
    def setSoTimeout(self, n: int | java.jint | java.lang.Integer, /) -> None: ...
    def shutdownInput(self) -> None: ...
    def shutdownOutput(self) -> None: ...
    def toString(self) -> str: ...

class LocalSocketAddress(java.lang.Object):
    @typing.overload
    def __init__(self, name: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, name: str | java.lang.String, namespace: LocalSocketAddress.Namespace, /) -> None: ...
    def getName(self) -> str: ...
    def getNamespace(self) -> LocalSocketAddress.Namespace: ...

    class Namespace(java.lang.Enum[LocalSocketAddress.Namespace]):
        ABSTRACT: typing.ClassVar[LocalSocketAddress.Namespace] = ...
        FILESYSTEM: typing.ClassVar[LocalSocketAddress.Namespace] = ...
        RESERVED: typing.ClassVar[LocalSocketAddress.Namespace] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> LocalSocketAddress.Namespace: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[LocalSocketAddress.Namespace]: ...

class MacAddress(android.os.Parcelable):
    BROADCAST_ADDRESS: typing.ClassVar[MacAddress] = ...
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[MacAddress]] = ...
    TYPE_BROADCAST: typing.ClassVar[int] = ...
    TYPE_MULTICAST: typing.ClassVar[int] = ...
    TYPE_UNICAST: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    @staticmethod
    def fromBytes(addr: java.chaquopy.JavaArrayJByte, /) -> MacAddress: ...
    @staticmethod
    def fromString(addr: str | java.lang.String, /) -> MacAddress: ...
    def getAddressType(self) -> int: ...
    def getLinkLocalIpv6FromEui48Mac(self) -> java.net.Inet6Address | None: ...
    def hashCode(self) -> int: ...
    def isLocallyAssigned(self) -> bool: ...
    def matches(self, baseAddress: MacAddress, mask: MacAddress, /) -> bool: ...
    def toByteArray(self) -> java.chaquopy.JavaArrayJByte: ...
    def toOuiString(self) -> str: ...
    def toString(self) -> str: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class MailTo(java.lang.Object):
    MAILTO_SCHEME: typing.ClassVar[str] = ...
    def getBody(self) -> str | None: ...
    def getCc(self) -> str | None: ...
    def getHeaders(self) -> java.util.Map[java.lang.String, java.lang.String]: ...
    def getSubject(self) -> str | None: ...
    def getTo(self) -> str | None: ...
    @staticmethod
    def isMailTo(url: str | java.lang.String, /) -> bool: ...
    @staticmethod
    def parse(url: str | java.lang.String, /) -> MailTo: ...
    def toString(self) -> str: ...

class Network(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[Network]] = ...
    @typing.overload
    def bindSocket(self, fd: java.io.FileDescriptor, /) -> None: ...
    @typing.overload
    def bindSocket(self, socket: java.net.DatagramSocket, /) -> None: ...
    @typing.overload
    def bindSocket(self, socket: java.net.Socket, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    @staticmethod
    def fromNetworkHandle(networkHandle: int | java.jlong | java.lang.Long, /) -> Network: ...
    def getAllByName(self, host: str | java.lang.String, /) -> java.chaquopy.JavaArray[java.net.InetAddress]: ...
    def getByName(self, host: str | java.lang.String, /) -> java.net.InetAddress: ...
    def getNetworkHandle(self) -> int: ...
    def getSocketFactory(self) -> javax.net.SocketFactory: ...
    def hashCode(self) -> int: ...
    @typing.overload
    def openConnection(self, url: java.net.URL, /) -> java.net.URLConnection: ...
    @typing.overload
    def openConnection(self, url: java.net.URL, proxy: java.net.Proxy, /) -> java.net.URLConnection: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class NetworkCapabilities(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[NetworkCapabilities]] = ...
    NET_CAPABILITY_CAPTIVE_PORTAL: typing.ClassVar[int] = ...
    NET_CAPABILITY_CBS: typing.ClassVar[int] = ...
    NET_CAPABILITY_DUN: typing.ClassVar[int] = ...
    NET_CAPABILITY_EIMS: typing.ClassVar[int] = ...
    NET_CAPABILITY_ENTERPRISE: typing.ClassVar[int] = ...
    NET_CAPABILITY_FOREGROUND: typing.ClassVar[int] = ...
    NET_CAPABILITY_FOTA: typing.ClassVar[int] = ...
    NET_CAPABILITY_HEAD_UNIT: typing.ClassVar[int] = ...
    NET_CAPABILITY_IA: typing.ClassVar[int] = ...
    NET_CAPABILITY_IMS: typing.ClassVar[int] = ...
    NET_CAPABILITY_INTERNET: typing.ClassVar[int] = ...
    NET_CAPABILITY_LOCAL_NETWORK: typing.ClassVar[int] = ...
    NET_CAPABILITY_MCX: typing.ClassVar[int] = ...
    NET_CAPABILITY_MMS: typing.ClassVar[int] = ...
    NET_CAPABILITY_MMTEL: typing.ClassVar[int] = ...
    NET_CAPABILITY_NOT_BANDWIDTH_CONSTRAINED: typing.ClassVar[int] = ...
    NET_CAPABILITY_NOT_CONGESTED: typing.ClassVar[int] = ...
    NET_CAPABILITY_NOT_METERED: typing.ClassVar[int] = ...
    NET_CAPABILITY_NOT_RESTRICTED: typing.ClassVar[int] = ...
    NET_CAPABILITY_NOT_ROAMING: typing.ClassVar[int] = ...
    NET_CAPABILITY_NOT_SUSPENDED: typing.ClassVar[int] = ...
    NET_CAPABILITY_NOT_VPN: typing.ClassVar[int] = ...
    NET_CAPABILITY_PRIORITIZE_BANDWIDTH: typing.ClassVar[int] = ...
    NET_CAPABILITY_PRIORITIZE_LATENCY: typing.ClassVar[int] = ...
    NET_CAPABILITY_RCS: typing.ClassVar[int] = ...
    NET_CAPABILITY_SUPL: typing.ClassVar[int] = ...
    NET_CAPABILITY_TEMPORARILY_NOT_METERED: typing.ClassVar[int] = ...
    NET_CAPABILITY_TRUSTED: typing.ClassVar[int] = ...
    NET_CAPABILITY_VALIDATED: typing.ClassVar[int] = ...
    NET_CAPABILITY_WIFI_P2P: typing.ClassVar[int] = ...
    NET_CAPABILITY_XCAP: typing.ClassVar[int] = ...
    NET_ENTERPRISE_ID_1: typing.ClassVar[int] = ...
    NET_ENTERPRISE_ID_2: typing.ClassVar[int] = ...
    NET_ENTERPRISE_ID_3: typing.ClassVar[int] = ...
    NET_ENTERPRISE_ID_4: typing.ClassVar[int] = ...
    NET_ENTERPRISE_ID_5: typing.ClassVar[int] = ...
    SIGNAL_STRENGTH_UNSPECIFIED: typing.ClassVar[int] = ...
    TRANSPORT_BLUETOOTH: typing.ClassVar[int] = ...
    TRANSPORT_CELLULAR: typing.ClassVar[int] = ...
    TRANSPORT_ETHERNET: typing.ClassVar[int] = ...
    TRANSPORT_LOWPAN: typing.ClassVar[int] = ...
    TRANSPORT_SATELLITE: typing.ClassVar[int] = ...
    TRANSPORT_THREAD: typing.ClassVar[int] = ...
    TRANSPORT_USB: typing.ClassVar[int] = ...
    TRANSPORT_VPN: typing.ClassVar[int] = ...
    TRANSPORT_WIFI: typing.ClassVar[int] = ...
    TRANSPORT_WIFI_AWARE: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, nc: NetworkCapabilities, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getCapabilities(self) -> java.chaquopy.JavaArrayJInt: ...
    def getEnterpriseIds(self) -> java.chaquopy.JavaArrayJInt: ...
    def getLinkDownstreamBandwidthKbps(self) -> int: ...
    def getLinkUpstreamBandwidthKbps(self) -> int: ...
    def getNetworkSpecifier(self) -> NetworkSpecifier | None: ...
    def getOwnerUid(self) -> int: ...
    def getSignalStrength(self) -> int: ...
    def getSubscriptionIds(self) -> java.util.Set[java.lang.Integer]: ...
    def getTransportInfo(self) -> TransportInfo | None: ...
    def hasCapability(self, capability: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hasEnterpriseId(self, enterpriseId: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hasTransport(self, transportType: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class NetworkInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[NetworkInfo]] = ...
    def __init__(self, type: int | java.jint | java.lang.Integer, subtype: int | java.jint | java.lang.Integer, typeName: str | java.lang.String, subtypeName: str | java.lang.String, /) -> None: ...
    def describeContents(self) -> int: ...
    def getDetailedState(self) -> NetworkInfo.DetailedState: ...
    def getExtraInfo(self) -> str | None: ...
    def getReason(self) -> str | None: ...
    def getState(self) -> NetworkInfo.State: ...
    def getSubtype(self) -> int: ...
    def getSubtypeName(self) -> str: ...
    def getType(self) -> int: ...
    def getTypeName(self) -> str: ...
    def isAvailable(self) -> bool: ...
    def isConnected(self) -> bool: ...
    def isConnectedOrConnecting(self) -> bool: ...
    def isFailover(self) -> bool: ...
    def isRoaming(self) -> bool: ...
    def setDetailedState(self, detailedState: NetworkInfo.DetailedState, reason: str | java.lang.String, extraInfo: str | java.lang.String, /) -> None: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class State(java.lang.Enum[NetworkInfo.State]):
        CONNECTED: typing.ClassVar[NetworkInfo.State] = ...
        CONNECTING: typing.ClassVar[NetworkInfo.State] = ...
        DISCONNECTED: typing.ClassVar[NetworkInfo.State] = ...
        DISCONNECTING: typing.ClassVar[NetworkInfo.State] = ...
        SUSPENDED: typing.ClassVar[NetworkInfo.State] = ...
        UNKNOWN: typing.ClassVar[NetworkInfo.State] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NetworkInfo.State: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NetworkInfo.State]: ...

    class DetailedState(java.lang.Enum[NetworkInfo.DetailedState]):
        AUTHENTICATING: typing.ClassVar[NetworkInfo.DetailedState] = ...
        BLOCKED: typing.ClassVar[NetworkInfo.DetailedState] = ...
        CAPTIVE_PORTAL_CHECK: typing.ClassVar[NetworkInfo.DetailedState] = ...
        CONNECTED: typing.ClassVar[NetworkInfo.DetailedState] = ...
        CONNECTING: typing.ClassVar[NetworkInfo.DetailedState] = ...
        DISCONNECTED: typing.ClassVar[NetworkInfo.DetailedState] = ...
        DISCONNECTING: typing.ClassVar[NetworkInfo.DetailedState] = ...
        FAILED: typing.ClassVar[NetworkInfo.DetailedState] = ...
        IDLE: typing.ClassVar[NetworkInfo.DetailedState] = ...
        OBTAINING_IPADDR: typing.ClassVar[NetworkInfo.DetailedState] = ...
        SCANNING: typing.ClassVar[NetworkInfo.DetailedState] = ...
        SUSPENDED: typing.ClassVar[NetworkInfo.DetailedState] = ...
        VERIFYING_POOR_LINK: typing.ClassVar[NetworkInfo.DetailedState] = ...
        @staticmethod
        def valueOf(name: str | java.lang.String, /) -> NetworkInfo.DetailedState: ...
        @staticmethod
        def values() -> java.chaquopy.JavaArray[NetworkInfo.DetailedState]: ...

class NetworkRequest(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[NetworkRequest]] = ...
    def canBeSatisfiedBy(self, nc: NetworkCapabilities, /) -> bool: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getCapabilities(self) -> java.chaquopy.JavaArrayJInt: ...
    def getNetworkSpecifier(self) -> NetworkSpecifier | None: ...
    def getSubscriptionIds(self) -> java.util.Set[java.lang.Integer]: ...
    def getTransportTypes(self) -> java.chaquopy.JavaArrayJInt: ...
    def hasCapability(self, capability: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hasTransport(self, transportType: int | java.jint | java.lang.Integer, /) -> bool: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self) -> None: ...
        @typing.overload
        def __init__(self, request: NetworkRequest, /) -> None: ...
        def addCapability(self, capability: int | java.jint | java.lang.Integer, /) -> NetworkRequest.Builder: ...
        def addTransportType(self, transportType: int | java.jint | java.lang.Integer, /) -> NetworkRequest.Builder: ...
        def build(self) -> NetworkRequest: ...
        def clearCapabilities(self) -> NetworkRequest.Builder: ...
        def removeCapability(self, capability: int | java.jint | java.lang.Integer, /) -> NetworkRequest.Builder: ...
        def removeTransportType(self, transportType: int | java.jint | java.lang.Integer, /) -> NetworkRequest.Builder: ...
        def setIncludeOtherUidNetworks(self, include: bool | java.jboolean | java.lang.Boolean, /) -> NetworkRequest.Builder: ...
        @typing.overload
        def setNetworkSpecifier(self, networkSpecifier: NetworkSpecifier, /) -> NetworkRequest.Builder: ...
        @typing.overload
        def setNetworkSpecifier(self, networkSpecifier: str | java.lang.String, /) -> NetworkRequest.Builder: ...
        def setSubscriptionIds(self, subIds: java.util.Set[java.lang.Integer], /) -> NetworkRequest.Builder: ...

class NetworkSpecifier(java.lang.Object):
    def __init__(self) -> None: ...

class ParseException(java.lang.RuntimeException):
    response: str = ...
    @typing.overload
    def __init__(self, response: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, response: str | java.lang.String, cause: java.lang.Throwable, /) -> None: ...

class PlatformVpnProfile(java.lang.Object):
    TYPE_IKEV2_IPSEC_PSK: typing.ClassVar[int] = ...
    TYPE_IKEV2_IPSEC_RSA: typing.ClassVar[int] = ...
    TYPE_IKEV2_IPSEC_USER_PASS: typing.ClassVar[int] = ...
    def areLocalRoutesExcluded(self) -> bool: ...
    def getType(self) -> int: ...
    def getTypeString(self) -> str: ...
    def isInternetValidationRequired(self) -> bool: ...

class Proxy(java.lang.Object):
    PROXY_CHANGE_ACTION: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    @staticmethod
    def getDefaultHost() -> str | None: ...
    @staticmethod
    def getDefaultPort() -> int: ...
    @staticmethod
    def getHost(ctx: android.content.Context, /) -> str: ...
    @staticmethod
    def getPort(ctx: android.content.Context, /) -> int: ...

class ProxyInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[ProxyInfo]] = ...
    def __init__(self, source: ProxyInfo, /) -> None: ...
    @typing.overload
    @staticmethod
    def buildDirectProxy(host: str | java.lang.String, port: int | java.jint | java.lang.Integer, /) -> ProxyInfo: ...
    @typing.overload
    @staticmethod
    def buildDirectProxy(host: str | java.lang.String, port: int | java.jint | java.lang.Integer, exclList: java.util.List[java.lang.String], /) -> ProxyInfo: ...
    @typing.overload
    @staticmethod
    def buildPacProxy(pacUri: Uri, /) -> ProxyInfo: ...
    @typing.overload
    @staticmethod
    def buildPacProxy(pacUrl: Uri, port: int | java.jint | java.lang.Integer, /) -> ProxyInfo: ...
    def describeContents(self) -> int: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getExclusionList(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def getHost(self) -> str: ...
    def getPacFileUrl(self) -> Uri: ...
    def getPort(self) -> int: ...
    def hashCode(self) -> int: ...
    def isValid(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class RouteInfo(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[RouteInfo]] = ...
    RTN_THROW: typing.ClassVar[int] = ...
    RTN_UNICAST: typing.ClassVar[int] = ...
    RTN_UNREACHABLE: typing.ClassVar[int] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDestination(self) -> IpPrefix: ...
    def getGateway(self) -> java.net.InetAddress | None: ...
    def getInterface(self) -> str | None: ...
    def getType(self) -> int: ...
    def hasGateway(self) -> bool: ...
    def hashCode(self) -> int: ...
    def isDefaultRoute(self) -> bool: ...
    def matches(self, destination: java.net.InetAddress, /) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class SSLCertificateSocketFactory(javax.net.ssl.SSLSocketFactory):
    def __init__(self, handshakeTimeoutMillis: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    def createSocket(self) -> java.net.Socket: ...
    @typing.overload
    def createSocket(self, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, /) -> java.net.Socket: ...
    @typing.overload
    def createSocket(self, addr: java.net.InetAddress, port: int | java.jint | java.lang.Integer, /) -> java.net.Socket: ...
    @typing.overload
    def createSocket(self, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, localAddr: java.net.InetAddress, localPort: int | java.jint | java.lang.Integer, /) -> java.net.Socket: ...
    @typing.overload
    def createSocket(self, addr: java.net.InetAddress, port: int | java.jint | java.lang.Integer, localAddr: java.net.InetAddress, localPort: int | java.jint | java.lang.Integer, /) -> java.net.Socket: ...
    @typing.overload
    def createSocket(self, k: java.net.Socket, host: str | java.lang.String, port: int | java.jint | java.lang.Integer, close: bool | java.jboolean | java.lang.Boolean, /) -> java.net.Socket: ...
    @typing.overload
    @staticmethod
    def getDefault(handshakeTimeoutMillis: int | java.jint | java.lang.Integer, /) -> javax.net.SocketFactory: ...
    @typing.overload
    @staticmethod
    def getDefault(handshakeTimeoutMillis: int | java.jint | java.lang.Integer, cache: SSLSessionCache, /) -> javax.net.ssl.SSLSocketFactory: ...
    def getDefaultCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    @staticmethod
    def getInsecure(handshakeTimeoutMillis: int | java.jint | java.lang.Integer, cache: SSLSessionCache, /) -> javax.net.ssl.SSLSocketFactory: ...
    def getNpnSelectedProtocol(self, socket: java.net.Socket, /) -> java.chaquopy.JavaArrayJByte: ...
    def getSupportedCipherSuites(self) -> java.chaquopy.JavaArray[java.lang.String]: ...
    def setHostname(self, socket: java.net.Socket, hostName: str | java.lang.String, /) -> None: ...
    def setKeyManagers(self, keyManagers: java.chaquopy.JavaArray[javax.net.ssl.KeyManager], /) -> None: ...
    def setNpnProtocols(self, npnProtocols: java.chaquopy.JavaArray[java.chaquopy.JavaArrayJByte], /) -> None: ...
    def setTrustManagers(self, trustManager: java.chaquopy.JavaArray[javax.net.ssl.TrustManager], /) -> None: ...
    def setUseSessionTickets(self, socket: java.net.Socket, useSessionTickets: bool | java.jboolean | java.lang.Boolean, /) -> None: ...

class SSLSessionCache(java.lang.Object):
    @typing.overload
    def __init__(self, context: android.content.Context, /) -> None: ...
    @typing.overload
    def __init__(self, dir: java.io.File, /) -> None: ...

class SocketKeepalive(java.lang.AutoCloseable):
    ERROR_HARDWARE_ERROR: typing.ClassVar[int] = ...
    ERROR_INSUFFICIENT_RESOURCES: typing.ClassVar[int] = ...
    ERROR_INVALID_INTERVAL: typing.ClassVar[int] = ...
    ERROR_INVALID_IP_ADDRESS: typing.ClassVar[int] = ...
    ERROR_INVALID_LENGTH: typing.ClassVar[int] = ...
    ERROR_INVALID_NETWORK: typing.ClassVar[int] = ...
    ERROR_INVALID_PORT: typing.ClassVar[int] = ...
    ERROR_INVALID_SOCKET: typing.ClassVar[int] = ...
    ERROR_SOCKET_NOT_IDLE: typing.ClassVar[int] = ...
    ERROR_UNSUPPORTED: typing.ClassVar[int] = ...
    def close(self) -> None: ...
    def start(self, intervalSec: int | java.jint | java.lang.Integer, /) -> None: ...
    def stop(self) -> None: ...

    class Callback(java.lang.Object):
        def __init__(self) -> None: ...
        def onDataReceived(self) -> None: ...
        def onError(self, error: int | java.jint | java.lang.Integer, /) -> None: ...
        def onStarted(self) -> None: ...
        def onStopped(self) -> None: ...

class StaticIpConfiguration(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[StaticIpConfiguration]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getDnsServers(self) -> java.util.List[java.net.InetAddress]: ...
    def getDomains(self) -> str | None: ...
    def getGateway(self) -> java.net.InetAddress | None: ...
    def getIpAddress(self) -> LinkAddress: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> StaticIpConfiguration: ...
        def setDnsServers(self, dnsServers: java.lang.Iterable[java.net.InetAddress], /) -> StaticIpConfiguration.Builder: ...
        def setDomains(self, newDomains: str | java.lang.String, /) -> StaticIpConfiguration.Builder: ...
        def setGateway(self, gateway: java.net.InetAddress, /) -> StaticIpConfiguration.Builder: ...
        def setIpAddress(self, ipAddress: LinkAddress, /) -> StaticIpConfiguration.Builder: ...

class TelephonyNetworkSpecifier(NetworkSpecifier, android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[TelephonyNetworkSpecifier]] = ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getSubscriptionId(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def build(self) -> TelephonyNetworkSpecifier: ...
        def setSubscriptionId(self, subId: int | java.jint | java.lang.Integer, /) -> TelephonyNetworkSpecifier.Builder: ...

class TetheringInterface(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[TetheringInterface]] = ...
    @typing.overload
    def __init__(self, type: int | java.jint | java.lang.Integer, iface: str | java.lang.String, /) -> None: ...
    @typing.overload
    def __init__(self, type: int | java.jint | java.lang.Integer, iface: str | java.lang.String, softApConfig: android.net.wifi.SoftApConfiguration, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getInterface(self) -> str: ...
    def getSoftApConfiguration(self) -> android.net.wifi.SoftApConfiguration: ...
    def getType(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...
    def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class TetheringManager(java.lang.Object):
    CONNECTIVITY_SCOPE_GLOBAL: typing.ClassVar[int] = ...
    TETHERING_WIFI: typing.ClassVar[int] = ...
    TETHER_ERROR_DHCPSERVER_ERROR: typing.ClassVar[int] = ...
    TETHER_ERROR_DISABLE_FORWARDING_ERROR: typing.ClassVar[int] = ...
    TETHER_ERROR_DUPLICATE_REQUEST: typing.ClassVar[int] = ...
    TETHER_ERROR_ENABLE_FORWARDING_ERROR: typing.ClassVar[int] = ...
    TETHER_ERROR_ENTITLEMENT_UNKNOWN: typing.ClassVar[int] = ...
    TETHER_ERROR_IFACE_CFG_ERROR: typing.ClassVar[int] = ...
    TETHER_ERROR_INTERNAL_ERROR: typing.ClassVar[int] = ...
    TETHER_ERROR_NO_ACCESS_TETHERING_PERMISSION: typing.ClassVar[int] = ...
    TETHER_ERROR_NO_CHANGE_TETHERING_PERMISSION: typing.ClassVar[int] = ...
    TETHER_ERROR_NO_ERROR: typing.ClassVar[int] = ...
    TETHER_ERROR_PROVISIONING_FAILED: typing.ClassVar[int] = ...
    TETHER_ERROR_SERVICE_UNAVAIL: typing.ClassVar[int] = ...
    TETHER_ERROR_TETHER_IFACE_ERROR: typing.ClassVar[int] = ...
    TETHER_ERROR_UNAVAIL_IFACE: typing.ClassVar[int] = ...
    TETHER_ERROR_UNKNOWN_IFACE: typing.ClassVar[int] = ...
    TETHER_ERROR_UNKNOWN_REQUEST: typing.ClassVar[int] = ...
    TETHER_ERROR_UNKNOWN_TYPE: typing.ClassVar[int] = ...
    TETHER_ERROR_UNSUPPORTED: typing.ClassVar[int] = ...
    TETHER_ERROR_UNTETHER_IFACE_ERROR: typing.ClassVar[int] = ...
    def finalize(self) -> None: ...
    def registerTetheringEventCallback(self, executor: java.util.concurrent.Executor, callback: TetheringManager.TetheringEventCallback, /) -> None: ...
    def startTethering(self, request: TetheringManager.TetheringRequest, executor: java.util.concurrent.Executor, callback: TetheringManager.StartTetheringCallback, /) -> None: ...
    def stopTethering(self, request: TetheringManager.TetheringRequest, executor: java.util.concurrent.Executor, callback: TetheringManager.StopTetheringCallback, /) -> None: ...
    def unregisterTetheringEventCallback(self, callback: TetheringManager.TetheringEventCallback, /) -> None: ...

    class TetheringRequest(android.os.Parcelable):
        CREATOR: typing.ClassVar[android.os.Parcelable.Creator[TetheringManager.TetheringRequest]] = ...
        def describeContents(self) -> int: ...
        def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
        def getSoftApConfiguration(self) -> android.net.wifi.SoftApConfiguration: ...
        def hashCode(self) -> int: ...
        def toString(self) -> str: ...
        def writeToParcel(self, dest: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

        class Builder(java.lang.Object):
            def __init__(self, type: int | java.jint | java.lang.Integer, /) -> None: ...
            def build(self) -> TetheringManager.TetheringRequest: ...
            def setSoftApConfiguration(self, softApConfig: android.net.wifi.SoftApConfiguration, /) -> TetheringManager.TetheringRequest.Builder: ...

    class TetheringEventCallback(java.lang.Object):
        def onTetheredInterfacesChanged(self, interfaces: java.util.Set[TetheringInterface], /) -> None: ...

    class StopTetheringCallback(java.lang.Object):
        def onStopTetheringFailed(self, error: int | java.jint | java.lang.Integer, /) -> None: ...
        def onStopTetheringSucceeded(self) -> None: ...

    class StartTetheringCallback(java.lang.Object):
        def onTetheringFailed(self, error: int | java.jint | java.lang.Integer, /) -> None: ...
        def onTetheringStarted(self) -> None: ...

class TrafficStats(java.lang.Object):
    UNSUPPORTED: typing.ClassVar[int] = ...
    def __init__(self) -> None: ...
    @staticmethod
    def clearThreadStatsTag() -> None: ...
    @staticmethod
    def clearThreadStatsUid() -> None: ...
    @staticmethod
    def getAndSetThreadStatsTag(tag: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getMobileRxBytes() -> int: ...
    @staticmethod
    def getMobileRxPackets() -> int: ...
    @staticmethod
    def getMobileTxBytes() -> int: ...
    @staticmethod
    def getMobileTxPackets() -> int: ...
    @staticmethod
    def getRxBytes(iface: str | java.lang.String, /) -> int: ...
    @staticmethod
    def getRxPackets(iface: str | java.lang.String, /) -> int: ...
    @staticmethod
    def getThreadStatsTag() -> int: ...
    @staticmethod
    def getThreadStatsUid() -> int: ...
    @staticmethod
    def getTotalRxBytes() -> int: ...
    @staticmethod
    def getTotalRxPackets() -> int: ...
    @staticmethod
    def getTotalTxBytes() -> int: ...
    @staticmethod
    def getTotalTxPackets() -> int: ...
    @staticmethod
    def getTxBytes(iface: str | java.lang.String, /) -> int: ...
    @staticmethod
    def getTxPackets(iface: str | java.lang.String, /) -> int: ...
    @staticmethod
    def getUidRxBytes(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidRxPackets(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidTcpRxBytes(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidTcpRxSegments(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidTcpTxBytes(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidTcpTxSegments(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidTxBytes(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidTxPackets(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidUdpRxBytes(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidUdpRxPackets(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidUdpTxBytes(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @staticmethod
    def getUidUdpTxPackets(uid: int | java.jint | java.lang.Integer, /) -> int: ...
    @typing.overload
    @staticmethod
    def incrementOperationCount(operationCount: int | java.jint | java.lang.Integer, /) -> None: ...
    @typing.overload
    @staticmethod
    def incrementOperationCount(tag: int | java.jint | java.lang.Integer, operationCount: int | java.jint | java.lang.Integer, /) -> None: ...
    @staticmethod
    def setThreadStatsTag(tag: int | java.jint | java.lang.Integer, /) -> None: ...
    @staticmethod
    def setThreadStatsUid(uid: int | java.jint | java.lang.Integer, /) -> None: ...
    @staticmethod
    def tagDatagramSocket(socket: java.net.DatagramSocket, /) -> None: ...
    @staticmethod
    def tagFileDescriptor(fd: java.io.FileDescriptor, /) -> None: ...
    @staticmethod
    def tagSocket(socket: java.net.Socket, /) -> None: ...
    @staticmethod
    def untagDatagramSocket(socket: java.net.DatagramSocket, /) -> None: ...
    @staticmethod
    def untagFileDescriptor(fd: java.io.FileDescriptor, /) -> None: ...
    @staticmethod
    def untagSocket(socket: java.net.Socket, /) -> None: ...

class TransportInfo(java.lang.Object): ...

class Uri(android.os.Parcelable, java.lang.Comparable[Uri]):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[Uri]] = ...
    EMPTY: typing.ClassVar[Uri] = ...
    def buildUpon(self) -> Uri.Builder: ...
    def compareTo(self, other: Uri, /) -> int: ...
    @staticmethod
    def decode(s: str | java.lang.String, /) -> str | None: ...
    @typing.overload
    @staticmethod
    def encode(s: str | java.lang.String, /) -> str | None: ...
    @typing.overload
    @staticmethod
    def encode(s: str | java.lang.String, allow: str | java.lang.String, /) -> str | None: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    @staticmethod
    def fromFile(file: java.io.File, /) -> Uri: ...
    @staticmethod
    def fromParts(scheme: str | java.lang.String, ssp: str | java.lang.String, fragment: str | java.lang.String, /) -> Uri: ...
    def getAuthority(self) -> str | None: ...
    def getBooleanQueryParameter(self, key: str | java.lang.String, defaultValue: bool | java.jboolean | java.lang.Boolean, /) -> bool: ...
    def getEncodedAuthority(self) -> str | None: ...
    def getEncodedFragment(self) -> str | None: ...
    def getEncodedPath(self) -> str | None: ...
    def getEncodedQuery(self) -> str | None: ...
    def getEncodedSchemeSpecificPart(self) -> str: ...
    def getEncodedUserInfo(self) -> str | None: ...
    def getFragment(self) -> str | None: ...
    def getHost(self) -> str | None: ...
    def getLastPathSegment(self) -> str | None: ...
    def getPath(self) -> str | None: ...
    def getPathSegments(self) -> java.util.List[java.lang.String] | None: ...
    def getPort(self) -> int: ...
    def getQuery(self) -> str | None: ...
    def getQueryParameter(self, key: str | java.lang.String, /) -> str | None: ...
    def getQueryParameterNames(self) -> java.util.Set[java.lang.String]: ...
    def getQueryParameters(self, key: str | java.lang.String, /) -> java.util.List[java.lang.String]: ...
    def getScheme(self) -> str | None: ...
    def getSchemeSpecificPart(self) -> str: ...
    def getUserInfo(self) -> str | None: ...
    def hashCode(self) -> int: ...
    def isAbsolute(self) -> bool: ...
    def isHierarchical(self) -> bool: ...
    def isOpaque(self) -> bool: ...
    def isRelative(self) -> bool: ...
    def normalizeScheme(self) -> Uri: ...
    @staticmethod
    def parse(uriString: str | java.lang.String, /) -> Uri: ...
    def toString(self) -> str: ...
    @staticmethod
    def withAppendedPath(baseUri: Uri, pathSegment: str | java.lang.String, /) -> Uri: ...
    @staticmethod
    def writeToParcel(out: android.os.Parcel, uri: Uri, /) -> None: ...

    class Builder(java.lang.Object):
        def __init__(self) -> None: ...
        def appendEncodedPath(self, newSegment: str | java.lang.String, /) -> Uri.Builder: ...
        def appendPath(self, newSegment: str | java.lang.String, /) -> Uri.Builder: ...
        def appendQueryParameter(self, key: str | java.lang.String, value: str | java.lang.String, /) -> Uri.Builder: ...
        def authority(self, authority: str | java.lang.String, /) -> Uri.Builder: ...
        def build(self) -> Uri: ...
        def clearQuery(self) -> Uri.Builder: ...
        def encodedAuthority(self, authority: str | java.lang.String, /) -> Uri.Builder: ...
        def encodedFragment(self, fragment: str | java.lang.String, /) -> Uri.Builder: ...
        def encodedOpaquePart(self, opaquePart: str | java.lang.String, /) -> Uri.Builder: ...
        def encodedPath(self, path: str | java.lang.String, /) -> Uri.Builder: ...
        def encodedQuery(self, query: str | java.lang.String, /) -> Uri.Builder: ...
        def fragment(self, fragment: str | java.lang.String, /) -> Uri.Builder: ...
        def opaquePart(self, opaquePart: str | java.lang.String, /) -> Uri.Builder: ...
        def path(self, path: str | java.lang.String, /) -> Uri.Builder: ...
        def query(self, query: str | java.lang.String, /) -> Uri.Builder: ...
        def scheme(self, scheme: str | java.lang.String, /) -> Uri.Builder: ...
        def toString(self) -> str: ...

class UrlQuerySanitizer(java.lang.Object):
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, url: str | java.lang.String, /) -> None: ...
    def addSanitizedEntry(self, parameter: str | java.lang.String, value: str | java.lang.String, /) -> None: ...
    def clear(self) -> None: ...
    def decodeHexDigit(self, c: str | java.jchar | java.lang.Character, /) -> int: ...
    @staticmethod
    def getAllButNulAndAngleBracketsLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    @staticmethod
    def getAllButNulLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    @staticmethod
    def getAllButWhitespaceLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    @staticmethod
    def getAllIllegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    def getAllowUnregisteredParamaters(self) -> bool: ...
    @staticmethod
    def getAmpAndSpaceLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    @staticmethod
    def getAmpLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    def getEffectiveValueSanitizer(self, parameter: str | java.lang.String, /) -> UrlQuerySanitizer.ValueSanitizer: ...
    def getParameterList(self) -> java.util.List[UrlQuerySanitizer.ParameterValuePair]: ...
    def getParameterSet(self) -> java.util.Set[java.lang.String]: ...
    def getPreferFirstRepeatedParameter(self) -> bool: ...
    @staticmethod
    def getSpaceLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    def getUnregisteredParameterValueSanitizer(self) -> UrlQuerySanitizer.ValueSanitizer: ...
    @staticmethod
    def getUrlAndSpaceLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    @staticmethod
    def getUrlLegal() -> UrlQuerySanitizer.ValueSanitizer: ...
    def getValue(self, parameter: str | java.lang.String, /) -> str | None: ...
    def getValueSanitizer(self, parameter: str | java.lang.String, /) -> UrlQuerySanitizer.ValueSanitizer: ...
    def hasParameter(self, parameter: str | java.lang.String, /) -> bool: ...
    def isHexDigit(self, c: str | java.jchar | java.lang.Character, /) -> bool: ...
    def parseEntry(self, parameter: str | java.lang.String, value: str | java.lang.String, /) -> None: ...
    def parseQuery(self, query: str | java.lang.String, /) -> None: ...
    def parseUrl(self, url: str | java.lang.String, /) -> None: ...
    def registerParameter(self, parameter: str | java.lang.String, valueSanitizer: UrlQuerySanitizer.ValueSanitizer, /) -> None: ...
    def registerParameters(self, parameters: java.chaquopy.JavaArray[java.lang.String], valueSanitizer: UrlQuerySanitizer.ValueSanitizer, /) -> None: ...
    def setAllowUnregisteredParamaters(self, allowUnregisteredParamaters: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setPreferFirstRepeatedParameter(self, preferFirstRepeatedParameter: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setUnregisteredParameterValueSanitizer(self, sanitizer: UrlQuerySanitizer.ValueSanitizer, /) -> None: ...
    def unescape(self, string: str | java.lang.String, /) -> str: ...

    class ValueSanitizer(java.lang.Object):
        def sanitize(self, arg1: str | java.lang.String, /) -> str: ...

    class ParameterValuePair(java.lang.Object):
        mParameter: str = ...
        mValue: str = ...
        def __init__(self, this_0: UrlQuerySanitizer, parameter: str | java.lang.String, value: str | java.lang.String, /) -> None: ...

    class IllegalCharacterValueSanitizer(UrlQuerySanitizer.ValueSanitizer):
        ALL_BUT_NUL_AND_ANGLE_BRACKETS_LEGAL: typing.ClassVar[int] = ...
        ALL_BUT_NUL_LEGAL: typing.ClassVar[int] = ...
        ALL_BUT_WHITESPACE_LEGAL: typing.ClassVar[int] = ...
        ALL_ILLEGAL: typing.ClassVar[int] = ...
        ALL_OK: typing.ClassVar[int] = ...
        ALL_WHITESPACE_OK: typing.ClassVar[int] = ...
        AMP_AND_SPACE_LEGAL: typing.ClassVar[int] = ...
        AMP_LEGAL: typing.ClassVar[int] = ...
        AMP_OK: typing.ClassVar[int] = ...
        DQUOTE_OK: typing.ClassVar[int] = ...
        GT_OK: typing.ClassVar[int] = ...
        LT_OK: typing.ClassVar[int] = ...
        NON_7_BIT_ASCII_OK: typing.ClassVar[int] = ...
        NUL_OK: typing.ClassVar[int] = ...
        OTHER_WHITESPACE_OK: typing.ClassVar[int] = ...
        PCT_OK: typing.ClassVar[int] = ...
        SCRIPT_URL_OK: typing.ClassVar[int] = ...
        SPACE_LEGAL: typing.ClassVar[int] = ...
        SPACE_OK: typing.ClassVar[int] = ...
        SQUOTE_OK: typing.ClassVar[int] = ...
        URL_AND_SPACE_LEGAL: typing.ClassVar[int] = ...
        URL_LEGAL: typing.ClassVar[int] = ...
        def __init__(self, flags: int | java.jint | java.lang.Integer, /) -> None: ...
        def sanitize(self, value: str | java.lang.String, /) -> str: ...

class VpnManager(java.lang.Object):
    ACTION_VPN_MANAGER_EVENT: typing.ClassVar[str] = ...
    CATEGORY_EVENT_ALWAYS_ON_STATE_CHANGED: typing.ClassVar[str] = ...
    CATEGORY_EVENT_DEACTIVATED_BY_USER: typing.ClassVar[str] = ...
    CATEGORY_EVENT_IKE_ERROR: typing.ClassVar[str] = ...
    CATEGORY_EVENT_NETWORK_ERROR: typing.ClassVar[str] = ...
    ERROR_CLASS_NOT_RECOVERABLE: typing.ClassVar[int] = ...
    ERROR_CLASS_RECOVERABLE: typing.ClassVar[int] = ...
    ERROR_CODE_NETWORK_IO: typing.ClassVar[int] = ...
    ERROR_CODE_NETWORK_LOST: typing.ClassVar[int] = ...
    ERROR_CODE_NETWORK_PROTOCOL_TIMEOUT: typing.ClassVar[int] = ...
    ERROR_CODE_NETWORK_UNKNOWN_HOST: typing.ClassVar[int] = ...
    EXTRA_ERROR_CLASS: typing.ClassVar[str] = ...
    EXTRA_ERROR_CODE: typing.ClassVar[str] = ...
    EXTRA_SESSION_KEY: typing.ClassVar[str] = ...
    EXTRA_TIMESTAMP_MILLIS: typing.ClassVar[str] = ...
    EXTRA_UNDERLYING_LINK_PROPERTIES: typing.ClassVar[str] = ...
    EXTRA_UNDERLYING_NETWORK: typing.ClassVar[str] = ...
    EXTRA_UNDERLYING_NETWORK_CAPABILITIES: typing.ClassVar[str] = ...
    EXTRA_VPN_PROFILE_STATE: typing.ClassVar[str] = ...
    def deleteProvisionedVpnProfile(self) -> None: ...
    def getProvisionedVpnProfileState(self) -> VpnProfileState | None: ...
    def provisionVpnProfile(self, profile: PlatformVpnProfile, /) -> android.content.Intent | None: ...
    def startProvisionedVpnProfile(self) -> None: ...
    def startProvisionedVpnProfileSession(self) -> str: ...
    def stopProvisionedVpnProfile(self) -> None: ...

class VpnProfileState(android.os.Parcelable):
    CREATOR: typing.ClassVar[android.os.Parcelable.Creator[VpnProfileState]] = ...
    STATE_CONNECTED: typing.ClassVar[int] = ...
    STATE_CONNECTING: typing.ClassVar[int] = ...
    STATE_DISCONNECTED: typing.ClassVar[int] = ...
    STATE_FAILED: typing.ClassVar[int] = ...
    def __init__(self, state: int | java.jint | java.lang.Integer, sessionKey: str | java.lang.String, alwaysOn: bool | java.jboolean | java.lang.Boolean, lockdown: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def describeContents(self) -> int: ...
    def equals(self, obj: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getSessionId(self) -> str | None: ...
    def getState(self) -> int: ...
    def hashCode(self) -> int: ...
    def isAlwaysOn(self) -> bool: ...
    def isLockdownEnabled(self) -> bool: ...
    def toString(self) -> str: ...
    def writeToParcel(self, out: android.os.Parcel, flags: int | java.jint | java.lang.Integer, /) -> None: ...

class VpnService(android.app.Service):
    SERVICE_INTERFACE: typing.ClassVar[str] = ...
    SERVICE_META_DATA_SUPPORTS_ALWAYS_ON: typing.ClassVar[str] = ...
    def __init__(self) -> None: ...
    def isAlwaysOn(self) -> bool: ...
    def isLockdownEnabled(self) -> bool: ...
    def onBind(self, intent: android.content.Intent, /) -> android.os.IBinder: ...
    def onRevoke(self) -> None: ...
    @staticmethod
    def prepare(context: android.content.Context, /) -> android.content.Intent: ...
    @typing.overload
    def protect(self, socket: int | java.jint | java.lang.Integer, /) -> bool: ...
    @typing.overload
    def protect(self, socket: java.net.DatagramSocket, /) -> bool: ...
    @typing.overload
    def protect(self, socket: java.net.Socket, /) -> bool: ...
    def setUnderlyingNetworks(self, networks: java.chaquopy.JavaArray[Network], /) -> bool: ...

    class Builder(java.lang.Object):
        def __init__(self, this_0: VpnService, /) -> None: ...
        @typing.overload
        def addAddress(self, address: str | java.lang.String, prefixLength: int | java.jint | java.lang.Integer, /) -> VpnService.Builder: ...
        @typing.overload
        def addAddress(self, address: java.net.InetAddress, prefixLength: int | java.jint | java.lang.Integer, /) -> VpnService.Builder: ...
        def addAllowedApplication(self, packageName: str | java.lang.String, /) -> VpnService.Builder: ...
        def addDisallowedApplication(self, packageName: str | java.lang.String, /) -> VpnService.Builder: ...
        @typing.overload
        def addDnsServer(self, address: str | java.lang.String, /) -> VpnService.Builder: ...
        @typing.overload
        def addDnsServer(self, address: java.net.InetAddress, /) -> VpnService.Builder: ...
        @typing.overload
        def addRoute(self, prefix: IpPrefix, /) -> VpnService.Builder: ...
        @typing.overload
        def addRoute(self, address: str | java.lang.String, prefixLength: int | java.jint | java.lang.Integer, /) -> VpnService.Builder: ...
        @typing.overload
        def addRoute(self, address: java.net.InetAddress, prefixLength: int | java.jint | java.lang.Integer, /) -> VpnService.Builder: ...
        def addSearchDomain(self, domain: str | java.lang.String, /) -> VpnService.Builder: ...
        def allowBypass(self) -> VpnService.Builder: ...
        def allowFamily(self, family: int | java.jint | java.lang.Integer, /) -> VpnService.Builder: ...
        def establish(self) -> android.os.ParcelFileDescriptor: ...
        def excludeRoute(self, prefix: IpPrefix, /) -> VpnService.Builder: ...
        def setBlocking(self, blocking: bool | java.jboolean | java.lang.Boolean, /) -> VpnService.Builder: ...
        def setConfigureIntent(self, intent: android.app.PendingIntent, /) -> VpnService.Builder: ...
        def setHttpProxy(self, proxyInfo: ProxyInfo, /) -> VpnService.Builder: ...
        def setMetered(self, isMetered: bool | java.jboolean | java.lang.Boolean, /) -> VpnService.Builder: ...
        def setMtu(self, mtu: int | java.jint | java.lang.Integer, /) -> VpnService.Builder: ...
        def setSession(self, session: str | java.lang.String, /) -> VpnService.Builder: ...
        def setUnderlyingNetworks(self, networks: java.chaquopy.JavaArray[Network], /) -> VpnService.Builder: ...
