paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 1 | // Signature format: 2.0 |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 2 | package android.app.usage { |
| 3 | |
| 4 | public final class NetworkStats implements java.lang.AutoCloseable { |
| 5 | method public void close(); |
| 6 | method public boolean getNextBucket(android.app.usage.NetworkStats.Bucket); |
| 7 | method public boolean hasNextBucket(); |
| 8 | } |
| 9 | |
| 10 | public static class NetworkStats.Bucket { |
| 11 | ctor public NetworkStats.Bucket(); |
| 12 | method public int getDefaultNetworkStatus(); |
| 13 | method public long getEndTimeStamp(); |
| 14 | method public int getMetered(); |
| 15 | method public int getRoaming(); |
| 16 | method public long getRxBytes(); |
| 17 | method public long getRxPackets(); |
| 18 | method public long getStartTimeStamp(); |
| 19 | method public int getState(); |
| 20 | method public int getTag(); |
| 21 | method public long getTxBytes(); |
| 22 | method public long getTxPackets(); |
| 23 | method public int getUid(); |
| 24 | field public static final int DEFAULT_NETWORK_ALL = -1; // 0xffffffff |
| 25 | field public static final int DEFAULT_NETWORK_NO = 1; // 0x1 |
| 26 | field public static final int DEFAULT_NETWORK_YES = 2; // 0x2 |
| 27 | field public static final int METERED_ALL = -1; // 0xffffffff |
| 28 | field public static final int METERED_NO = 1; // 0x1 |
| 29 | field public static final int METERED_YES = 2; // 0x2 |
| 30 | field public static final int ROAMING_ALL = -1; // 0xffffffff |
| 31 | field public static final int ROAMING_NO = 1; // 0x1 |
| 32 | field public static final int ROAMING_YES = 2; // 0x2 |
| 33 | field public static final int STATE_ALL = -1; // 0xffffffff |
| 34 | field public static final int STATE_DEFAULT = 1; // 0x1 |
| 35 | field public static final int STATE_FOREGROUND = 2; // 0x2 |
| 36 | field public static final int TAG_NONE = 0; // 0x0 |
| 37 | field public static final int UID_ALL = -1; // 0xffffffff |
| 38 | field public static final int UID_REMOVED = -4; // 0xfffffffc |
| 39 | field public static final int UID_TETHERING = -5; // 0xfffffffb |
| 40 | } |
| 41 | |
| 42 | public class NetworkStatsManager { |
| 43 | method @WorkerThread public android.app.usage.NetworkStats queryDetails(int, String, long, long) throws android.os.RemoteException, java.lang.SecurityException; |
| 44 | method @WorkerThread public android.app.usage.NetworkStats queryDetailsForUid(int, String, long, long, int) throws java.lang.SecurityException; |
| 45 | method @WorkerThread public android.app.usage.NetworkStats queryDetailsForUidTag(int, String, long, long, int, int) throws java.lang.SecurityException; |
| 46 | method @WorkerThread public android.app.usage.NetworkStats queryDetailsForUidTagState(int, String, long, long, int, int, int) throws java.lang.SecurityException; |
| 47 | method @WorkerThread public android.app.usage.NetworkStats querySummary(int, String, long, long) throws android.os.RemoteException, java.lang.SecurityException; |
| 48 | method @WorkerThread public android.app.usage.NetworkStats.Bucket querySummaryForDevice(int, String, long, long) throws android.os.RemoteException, java.lang.SecurityException; |
| 49 | method @WorkerThread public android.app.usage.NetworkStats.Bucket querySummaryForUser(int, String, long, long) throws android.os.RemoteException, java.lang.SecurityException; |
| 50 | method public void registerUsageCallback(int, String, long, android.app.usage.NetworkStatsManager.UsageCallback); |
| 51 | method public void registerUsageCallback(int, String, long, android.app.usage.NetworkStatsManager.UsageCallback, @Nullable android.os.Handler); |
| 52 | method public void unregisterUsageCallback(android.app.usage.NetworkStatsManager.UsageCallback); |
| 53 | } |
| 54 | |
| 55 | public abstract static class NetworkStatsManager.UsageCallback { |
| 56 | ctor public NetworkStatsManager.UsageCallback(); |
| 57 | method public abstract void onThresholdReached(int, String); |
| 58 | } |
| 59 | |
| 60 | } |
| 61 | |
Aaron Huang | 2e778ee | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 62 | package android.net { |
| 63 | |
| 64 | public final class IpSecAlgorithm implements android.os.Parcelable { |
| 65 | ctor public IpSecAlgorithm(@NonNull String, @NonNull byte[]); |
| 66 | ctor public IpSecAlgorithm(@NonNull String, @NonNull byte[], int); |
| 67 | method public int describeContents(); |
| 68 | method @NonNull public byte[] getKey(); |
| 69 | method @NonNull public String getName(); |
| 70 | method @NonNull public static java.util.Set<java.lang.String> getSupportedAlgorithms(); |
| 71 | method public int getTruncationLengthBits(); |
| 72 | method public void writeToParcel(android.os.Parcel, int); |
| 73 | field public static final String AUTH_AES_CMAC = "cmac(aes)"; |
| 74 | field public static final String AUTH_AES_XCBC = "xcbc(aes)"; |
| 75 | field public static final String AUTH_CRYPT_AES_GCM = "rfc4106(gcm(aes))"; |
| 76 | field public static final String AUTH_CRYPT_CHACHA20_POLY1305 = "rfc7539esp(chacha20,poly1305)"; |
| 77 | field public static final String AUTH_HMAC_MD5 = "hmac(md5)"; |
| 78 | field public static final String AUTH_HMAC_SHA1 = "hmac(sha1)"; |
| 79 | field public static final String AUTH_HMAC_SHA256 = "hmac(sha256)"; |
| 80 | field public static final String AUTH_HMAC_SHA384 = "hmac(sha384)"; |
| 81 | field public static final String AUTH_HMAC_SHA512 = "hmac(sha512)"; |
| 82 | field @NonNull public static final android.os.Parcelable.Creator<android.net.IpSecAlgorithm> CREATOR; |
| 83 | field public static final String CRYPT_AES_CBC = "cbc(aes)"; |
| 84 | field public static final String CRYPT_AES_CTR = "rfc3686(ctr(aes))"; |
| 85 | } |
| 86 | |
| 87 | public class IpSecManager { |
| 88 | method @NonNull public android.net.IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.InetAddress) throws android.net.IpSecManager.ResourceUnavailableException; |
| 89 | method @NonNull public android.net.IpSecManager.SecurityParameterIndex allocateSecurityParameterIndex(@NonNull java.net.InetAddress, int) throws android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException; |
| 90 | method public void applyTransportModeTransform(@NonNull java.net.Socket, int, @NonNull android.net.IpSecTransform) throws java.io.IOException; |
| 91 | method public void applyTransportModeTransform(@NonNull java.net.DatagramSocket, int, @NonNull android.net.IpSecTransform) throws java.io.IOException; |
| 92 | method public void applyTransportModeTransform(@NonNull java.io.FileDescriptor, int, @NonNull android.net.IpSecTransform) throws java.io.IOException; |
| 93 | method @NonNull public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket(int) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException; |
| 94 | method @NonNull public android.net.IpSecManager.UdpEncapsulationSocket openUdpEncapsulationSocket() throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException; |
| 95 | method public void removeTransportModeTransforms(@NonNull java.net.Socket) throws java.io.IOException; |
| 96 | method public void removeTransportModeTransforms(@NonNull java.net.DatagramSocket) throws java.io.IOException; |
| 97 | method public void removeTransportModeTransforms(@NonNull java.io.FileDescriptor) throws java.io.IOException; |
| 98 | field public static final int DIRECTION_IN = 0; // 0x0 |
| 99 | field public static final int DIRECTION_OUT = 1; // 0x1 |
| 100 | } |
| 101 | |
| 102 | public static final class IpSecManager.ResourceUnavailableException extends android.util.AndroidException { |
| 103 | } |
| 104 | |
| 105 | public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable { |
| 106 | method public void close(); |
| 107 | method public int getSpi(); |
| 108 | } |
| 109 | |
| 110 | public static final class IpSecManager.SpiUnavailableException extends android.util.AndroidException { |
| 111 | method public int getSpi(); |
| 112 | } |
| 113 | |
| 114 | public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable { |
| 115 | method public void close() throws java.io.IOException; |
| 116 | method public java.io.FileDescriptor getFileDescriptor(); |
| 117 | method public int getPort(); |
| 118 | } |
| 119 | |
| 120 | public final class IpSecTransform implements java.lang.AutoCloseable { |
| 121 | method public void close(); |
| 122 | } |
| 123 | |
| 124 | public static class IpSecTransform.Builder { |
| 125 | ctor public IpSecTransform.Builder(@NonNull android.content.Context); |
| 126 | method @NonNull public android.net.IpSecTransform buildTransportModeTransform(@NonNull java.net.InetAddress, @NonNull android.net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException; |
| 127 | method @NonNull public android.net.IpSecTransform.Builder setAuthenticatedEncryption(@NonNull android.net.IpSecAlgorithm); |
| 128 | method @NonNull public android.net.IpSecTransform.Builder setAuthentication(@NonNull android.net.IpSecAlgorithm); |
| 129 | method @NonNull public android.net.IpSecTransform.Builder setEncryption(@NonNull android.net.IpSecAlgorithm); |
| 130 | method @NonNull public android.net.IpSecTransform.Builder setIpv4Encapsulation(@NonNull android.net.IpSecManager.UdpEncapsulationSocket, int); |
| 131 | } |
| 132 | |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 133 | public class TrafficStats { |
| 134 | ctor public TrafficStats(); |
| 135 | method public static void clearThreadStatsTag(); |
| 136 | method public static void clearThreadStatsUid(); |
| 137 | method public static int getAndSetThreadStatsTag(int); |
| 138 | method public static long getMobileRxBytes(); |
| 139 | method public static long getMobileRxPackets(); |
| 140 | method public static long getMobileTxBytes(); |
| 141 | method public static long getMobileTxPackets(); |
| 142 | method public static long getRxBytes(@NonNull String); |
| 143 | method public static long getRxPackets(@NonNull String); |
| 144 | method public static int getThreadStatsTag(); |
| 145 | method public static int getThreadStatsUid(); |
| 146 | method public static long getTotalRxBytes(); |
| 147 | method public static long getTotalRxPackets(); |
| 148 | method public static long getTotalTxBytes(); |
| 149 | method public static long getTotalTxPackets(); |
| 150 | method public static long getTxBytes(@NonNull String); |
| 151 | method public static long getTxPackets(@NonNull String); |
| 152 | method public static long getUidRxBytes(int); |
| 153 | method public static long getUidRxPackets(int); |
| 154 | method @Deprecated public static long getUidTcpRxBytes(int); |
| 155 | method @Deprecated public static long getUidTcpRxSegments(int); |
| 156 | method @Deprecated public static long getUidTcpTxBytes(int); |
| 157 | method @Deprecated public static long getUidTcpTxSegments(int); |
| 158 | method public static long getUidTxBytes(int); |
| 159 | method public static long getUidTxPackets(int); |
| 160 | method @Deprecated public static long getUidUdpRxBytes(int); |
| 161 | method @Deprecated public static long getUidUdpRxPackets(int); |
| 162 | method @Deprecated public static long getUidUdpTxBytes(int); |
| 163 | method @Deprecated public static long getUidUdpTxPackets(int); |
| 164 | method public static void incrementOperationCount(int); |
| 165 | method public static void incrementOperationCount(int, int); |
| 166 | method public static void setThreadStatsTag(int); |
| 167 | method public static void setThreadStatsUid(int); |
| 168 | method public static void tagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException; |
| 169 | method public static void tagFileDescriptor(java.io.FileDescriptor) throws java.io.IOException; |
| 170 | method public static void tagSocket(java.net.Socket) throws java.net.SocketException; |
| 171 | method public static void untagDatagramSocket(java.net.DatagramSocket) throws java.net.SocketException; |
| 172 | method public static void untagFileDescriptor(java.io.FileDescriptor) throws java.io.IOException; |
| 173 | method public static void untagSocket(java.net.Socket) throws java.net.SocketException; |
| 174 | field public static final int UNSUPPORTED = -1; // 0xffffffff |
| 175 | } |
| 176 | |
Aaron Huang | 2e778ee | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 177 | } |
| 178 | |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 179 | package android.net.nsd { |
| 180 | |
| 181 | public final class NsdManager { |
| 182 | method public void discoverServices(String, int, android.net.nsd.NsdManager.DiscoveryListener); |
Remi NGUYEN VAN | 06bdcec | 2021-12-16 15:24:41 +0900 | [diff] [blame] | 183 | method public void discoverServices(@NonNull String, int, @Nullable android.net.Network, @NonNull android.net.nsd.NsdManager.DiscoveryListener); |
Remi NGUYEN VAN | 7929473 | 2022-01-18 19:27:48 +0900 | [diff] [blame] | 184 | method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void discoverServices(@NonNull String, int, @NonNull android.net.NetworkRequest, @NonNull android.net.nsd.NsdManager.DiscoveryListener); |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 185 | method public void registerService(android.net.nsd.NsdServiceInfo, int, android.net.nsd.NsdManager.RegistrationListener); |
| 186 | method public void resolveService(android.net.nsd.NsdServiceInfo, android.net.nsd.NsdManager.ResolveListener); |
| 187 | method public void stopServiceDiscovery(android.net.nsd.NsdManager.DiscoveryListener); |
| 188 | method public void unregisterService(android.net.nsd.NsdManager.RegistrationListener); |
| 189 | field public static final String ACTION_NSD_STATE_CHANGED = "android.net.nsd.STATE_CHANGED"; |
| 190 | field public static final String EXTRA_NSD_STATE = "nsd_state"; |
| 191 | field public static final int FAILURE_ALREADY_ACTIVE = 3; // 0x3 |
| 192 | field public static final int FAILURE_INTERNAL_ERROR = 0; // 0x0 |
| 193 | field public static final int FAILURE_MAX_LIMIT = 4; // 0x4 |
| 194 | field public static final int NSD_STATE_DISABLED = 1; // 0x1 |
| 195 | field public static final int NSD_STATE_ENABLED = 2; // 0x2 |
| 196 | field public static final int PROTOCOL_DNS_SD = 1; // 0x1 |
| 197 | } |
| 198 | |
| 199 | public static interface NsdManager.DiscoveryListener { |
| 200 | method public void onDiscoveryStarted(String); |
| 201 | method public void onDiscoveryStopped(String); |
| 202 | method public void onServiceFound(android.net.nsd.NsdServiceInfo); |
| 203 | method public void onServiceLost(android.net.nsd.NsdServiceInfo); |
| 204 | method public void onStartDiscoveryFailed(String, int); |
| 205 | method public void onStopDiscoveryFailed(String, int); |
| 206 | } |
| 207 | |
| 208 | public static interface NsdManager.RegistrationListener { |
| 209 | method public void onRegistrationFailed(android.net.nsd.NsdServiceInfo, int); |
| 210 | method public void onServiceRegistered(android.net.nsd.NsdServiceInfo); |
| 211 | method public void onServiceUnregistered(android.net.nsd.NsdServiceInfo); |
| 212 | method public void onUnregistrationFailed(android.net.nsd.NsdServiceInfo, int); |
| 213 | } |
| 214 | |
| 215 | public static interface NsdManager.ResolveListener { |
| 216 | method public void onResolveFailed(android.net.nsd.NsdServiceInfo, int); |
| 217 | method public void onServiceResolved(android.net.nsd.NsdServiceInfo); |
| 218 | } |
| 219 | |
| 220 | public final class NsdServiceInfo implements android.os.Parcelable { |
| 221 | ctor public NsdServiceInfo(); |
| 222 | method public int describeContents(); |
| 223 | method public java.util.Map<java.lang.String,byte[]> getAttributes(); |
| 224 | method public java.net.InetAddress getHost(); |
Remi NGUYEN VAN | 06bdcec | 2021-12-16 15:24:41 +0900 | [diff] [blame] | 225 | method @Nullable public android.net.Network getNetwork(); |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 226 | method public int getPort(); |
| 227 | method public String getServiceName(); |
| 228 | method public String getServiceType(); |
| 229 | method public void removeAttribute(String); |
| 230 | method public void setAttribute(String, String); |
| 231 | method public void setHost(java.net.InetAddress); |
Remi NGUYEN VAN | 06bdcec | 2021-12-16 15:24:41 +0900 | [diff] [blame] | 232 | method public void setNetwork(@Nullable android.net.Network); |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 233 | method public void setPort(int); |
| 234 | method public void setServiceName(String); |
| 235 | method public void setServiceType(String); |
| 236 | method public void writeToParcel(android.os.Parcel, int); |
| 237 | field @NonNull public static final android.os.Parcelable.Creator<android.net.nsd.NsdServiceInfo> CREATOR; |
| 238 | } |
| 239 | |
| 240 | } |
| 241 | |