paulhu | 667e8fb | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 1 | // Signature format: 2.0 |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 2 | package android.app.usage { |
| 3 | |
| 4 | public class NetworkStatsManager { |
| 5 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void forceUpdate(); |
| 6 | method public static int getCollapsedRatType(int); |
junyulai | b59e542 | 2022-03-01 17:08:01 +0800 | [diff] [blame^] | 7 | method @NonNull @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public android.net.NetworkStats getMobileUidStats(); |
| 8 | method @NonNull @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public android.net.NetworkStats getWifiUidStats(); |
Aaron Huang | 5417280 | 2022-03-10 17:57:12 +0800 | [diff] [blame] | 9 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void noteUidForeground(int, boolean); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 10 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void notifyNetworkStatus(@NonNull java.util.List<android.net.Network>, @NonNull java.util.List<android.net.NetworkStateSnapshot>, @Nullable String, @NonNull java.util.List<android.net.UnderlyingNetworkInfo>); |
| 11 | method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForDevice(@NonNull android.net.NetworkTemplate, long, long); |
| 12 | method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForUidTagState(@NonNull android.net.NetworkTemplate, long, long, int, int, int) throws java.lang.SecurityException; |
| 13 | method @NonNull @WorkerThread public android.app.usage.NetworkStats querySummary(@NonNull android.net.NetworkTemplate, long, long) throws java.lang.SecurityException; |
| 14 | method @NonNull @WorkerThread public android.app.usage.NetworkStats.Bucket querySummaryForDevice(@NonNull android.net.NetworkTemplate, long, long); |
| 15 | method @NonNull @WorkerThread public android.app.usage.NetworkStats queryTaggedSummary(@NonNull android.net.NetworkTemplate, long, long) throws java.lang.SecurityException; |
Frank | 21d9760 | 2022-02-05 14:59:05 +0800 | [diff] [blame] | 16 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}, conditional=true) public void registerUsageCallback(@NonNull android.net.NetworkTemplate, long, @NonNull java.util.concurrent.Executor, @NonNull android.app.usage.NetworkStatsManager.UsageCallback); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 17 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setDefaultGlobalAlert(long); |
Remi NGUYEN VAN | 0046059 | 2022-02-03 11:32:46 +0900 | [diff] [blame] | 18 | method public void setPollForce(boolean); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 19 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setPollOnOpen(boolean); |
| 20 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setStatsProviderWarningAndLimitAsync(@NonNull String, long, long); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 21 | field public static final int NETWORK_TYPE_5G_NSA = -2; // 0xfffffffe |
| 22 | } |
| 23 | |
| 24 | public abstract static class NetworkStatsManager.UsageCallback { |
| 25 | method public void onThresholdReached(@NonNull android.net.NetworkTemplate); |
| 26 | } |
| 27 | |
| 28 | } |
| 29 | |
Xinyi Zhou | ff98750 | 2022-03-09 17:38:41 -0800 | [diff] [blame] | 30 | package android.nearby { |
| 31 | |
| 32 | public final class NearbyFrameworkInitializer { |
| 33 | method public static void registerServiceWrappers(); |
| 34 | } |
| 35 | |
| 36 | } |
| 37 | |
paulhu | 667e8fb | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 38 | package android.net { |
| 39 | |
| 40 | public final class ConnectivityFrameworkInitializerTiramisu { |
| 41 | method public static void registerServiceWrappers(); |
| 42 | } |
| 43 | |
Xiao Ma | eaaf7d3 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 44 | public class EthernetManager { |
| 45 | method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void addInterfaceStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.EthernetManager.InterfaceStateListener); |
| 46 | method public void removeInterfaceStateListener(@NonNull android.net.EthernetManager.InterfaceStateListener); |
| 47 | method public void setIncludeTestInterfaces(boolean); |
| 48 | field public static final int ROLE_CLIENT = 1; // 0x1 |
| 49 | field public static final int ROLE_NONE = 0; // 0x0 |
| 50 | field public static final int ROLE_SERVER = 2; // 0x2 |
| 51 | field public static final int STATE_ABSENT = 0; // 0x0 |
| 52 | field public static final int STATE_LINK_DOWN = 1; // 0x1 |
| 53 | field public static final int STATE_LINK_UP = 2; // 0x2 |
| 54 | } |
| 55 | |
| 56 | public static interface EthernetManager.InterfaceStateListener { |
| 57 | method public void onInterfaceStateChanged(@NonNull String, int, int, @Nullable android.net.IpConfiguration); |
| 58 | } |
| 59 | |
Yan Yan | f8063e3 | 2022-02-08 19:26:29 -0800 | [diff] [blame] | 60 | public class IpSecManager { |
Aaron Huang | 68ca373 | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 61 | field public static final int DIRECTION_FWD = 2; // 0x2 |
| 62 | } |
| 63 | |
| 64 | public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable { |
| 65 | method public int getResourceId(); |
| 66 | } |
| 67 | |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 68 | public class NetworkIdentity { |
| 69 | method public int getOemManaged(); |
| 70 | method public int getRatType(); |
lifr | 1f78860 | 2021-11-18 02:37:28 +0800 | [diff] [blame] | 71 | method public int getSubId(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 72 | method @Nullable public String getSubscriberId(); |
| 73 | method public int getType(); |
| 74 | method @Nullable public String getWifiNetworkKey(); |
| 75 | method public boolean isDefaultNetwork(); |
| 76 | method public boolean isMetered(); |
| 77 | method public boolean isRoaming(); |
| 78 | } |
| 79 | |
| 80 | public static final class NetworkIdentity.Builder { |
| 81 | ctor public NetworkIdentity.Builder(); |
| 82 | method @NonNull public android.net.NetworkIdentity build(); |
| 83 | method @NonNull public android.net.NetworkIdentity.Builder clearRatType(); |
| 84 | method @NonNull public android.net.NetworkIdentity.Builder setDefaultNetwork(boolean); |
| 85 | method @NonNull public android.net.NetworkIdentity.Builder setMetered(boolean); |
| 86 | method @NonNull public android.net.NetworkIdentity.Builder setNetworkStateSnapshot(@NonNull android.net.NetworkStateSnapshot); |
| 87 | method @NonNull public android.net.NetworkIdentity.Builder setOemManaged(int); |
| 88 | method @NonNull public android.net.NetworkIdentity.Builder setRatType(int); |
| 89 | method @NonNull public android.net.NetworkIdentity.Builder setRoaming(boolean); |
lifr | 1f78860 | 2021-11-18 02:37:28 +0800 | [diff] [blame] | 90 | method @NonNull public android.net.NetworkIdentity.Builder setSubId(int); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 91 | method @NonNull public android.net.NetworkIdentity.Builder setSubscriberId(@Nullable String); |
| 92 | method @NonNull public android.net.NetworkIdentity.Builder setType(int); |
| 93 | method @NonNull public android.net.NetworkIdentity.Builder setWifiNetworkKey(@Nullable String); |
| 94 | } |
| 95 | |
| 96 | public final class NetworkStateSnapshot implements android.os.Parcelable { |
| 97 | ctor public NetworkStateSnapshot(@NonNull android.net.Network, @NonNull android.net.NetworkCapabilities, @NonNull android.net.LinkProperties, @Nullable String, int); |
| 98 | method public int describeContents(); |
| 99 | method public int getLegacyType(); |
| 100 | method @NonNull public android.net.LinkProperties getLinkProperties(); |
| 101 | method @NonNull public android.net.Network getNetwork(); |
| 102 | method @NonNull public android.net.NetworkCapabilities getNetworkCapabilities(); |
lifr | 1f78860 | 2021-11-18 02:37:28 +0800 | [diff] [blame] | 103 | method public int getSubId(); |
| 104 | method @Deprecated @Nullable public String getSubscriberId(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 105 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 106 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStateSnapshot> CREATOR; |
| 107 | } |
| 108 | |
junyulai | b59e542 | 2022-03-01 17:08:01 +0800 | [diff] [blame^] | 109 | public final class NetworkStats implements java.lang.Iterable<android.net.NetworkStats.Entry> android.os.Parcelable { |
| 110 | method @NonNull public java.util.Iterator<android.net.NetworkStats.Entry> iterator(); |
| 111 | } |
| 112 | |
| 113 | public static class NetworkStats.Entry { |
| 114 | method public int getDefaultNetwork(); |
| 115 | method public int getMetered(); |
| 116 | method public long getOperations(); |
| 117 | method public int getRoaming(); |
| 118 | method public long getRxBytes(); |
| 119 | method public long getRxPackets(); |
| 120 | method public int getSet(); |
| 121 | method public int getTag(); |
| 122 | method public long getTxBytes(); |
| 123 | method public long getTxPackets(); |
| 124 | method public int getUid(); |
| 125 | } |
| 126 | |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 127 | public class NetworkStatsCollection { |
| 128 | method @NonNull public java.util.Map<android.net.NetworkStatsCollection.Key,android.net.NetworkStatsHistory> getEntries(); |
| 129 | } |
| 130 | |
| 131 | public static final class NetworkStatsCollection.Builder { |
| 132 | ctor public NetworkStatsCollection.Builder(long); |
| 133 | method @NonNull public android.net.NetworkStatsCollection.Builder addEntry(@NonNull android.net.NetworkStatsCollection.Key, @NonNull android.net.NetworkStatsHistory); |
| 134 | method @NonNull public android.net.NetworkStatsCollection build(); |
| 135 | } |
| 136 | |
Frank | 349fadf | 2022-03-07 16:31:26 +0800 | [diff] [blame] | 137 | public static final class NetworkStatsCollection.Key { |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 138 | ctor public NetworkStatsCollection.Key(@NonNull java.util.Set<android.net.NetworkIdentity>, int, int, int); |
| 139 | } |
| 140 | |
| 141 | public final class NetworkStatsHistory implements android.os.Parcelable { |
| 142 | method public int describeContents(); |
| 143 | method @NonNull public java.util.List<android.net.NetworkStatsHistory.Entry> getEntries(); |
| 144 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 145 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStatsHistory> CREATOR; |
| 146 | } |
| 147 | |
| 148 | public static final class NetworkStatsHistory.Builder { |
| 149 | ctor public NetworkStatsHistory.Builder(long, int); |
| 150 | method @NonNull public android.net.NetworkStatsHistory.Builder addEntry(@NonNull android.net.NetworkStatsHistory.Entry); |
| 151 | method @NonNull public android.net.NetworkStatsHistory build(); |
| 152 | } |
| 153 | |
| 154 | public static final class NetworkStatsHistory.Entry { |
| 155 | ctor public NetworkStatsHistory.Entry(long, long, long, long, long, long, long); |
| 156 | method public long getActiveTime(); |
| 157 | method public long getBucketStart(); |
| 158 | method public long getOperations(); |
| 159 | method public long getRxBytes(); |
| 160 | method public long getRxPackets(); |
| 161 | method public long getTxBytes(); |
| 162 | method public long getTxPackets(); |
| 163 | } |
| 164 | |
| 165 | public final class NetworkTemplate implements android.os.Parcelable { |
| 166 | method public int describeContents(); |
| 167 | method public int getDefaultNetworkStatus(); |
| 168 | method public int getMatchRule(); |
| 169 | method public int getMeteredness(); |
| 170 | method public int getOemManaged(); |
| 171 | method public int getRatType(); |
| 172 | method public int getRoaming(); |
| 173 | method @NonNull public java.util.Set<java.lang.String> getSubscriberIds(); |
| 174 | method @NonNull public java.util.Set<java.lang.String> getWifiNetworkKeys(); |
| 175 | method public boolean matches(@NonNull android.net.NetworkIdentity); |
| 176 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 177 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkTemplate> CREATOR; |
| 178 | field public static final int MATCH_BLUETOOTH = 8; // 0x8 |
| 179 | field public static final int MATCH_CARRIER = 10; // 0xa |
| 180 | field public static final int MATCH_ETHERNET = 5; // 0x5 |
| 181 | field public static final int MATCH_MOBILE = 1; // 0x1 |
Lorenzo Colitti | 2d869d5 | 2022-02-04 03:08:12 +0900 | [diff] [blame] | 182 | field public static final int MATCH_PROXY = 9; // 0x9 |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 183 | field public static final int MATCH_WIFI = 4; // 0x4 |
| 184 | field public static final int NETWORK_TYPE_ALL = -1; // 0xffffffff |
| 185 | field public static final int OEM_MANAGED_ALL = -1; // 0xffffffff |
| 186 | field public static final int OEM_MANAGED_NO = 0; // 0x0 |
| 187 | field public static final int OEM_MANAGED_PAID = 1; // 0x1 |
| 188 | field public static final int OEM_MANAGED_PRIVATE = 2; // 0x2 |
| 189 | field public static final int OEM_MANAGED_YES = -2; // 0xfffffffe |
| 190 | } |
| 191 | |
| 192 | public static final class NetworkTemplate.Builder { |
| 193 | ctor public NetworkTemplate.Builder(int); |
| 194 | method @NonNull public android.net.NetworkTemplate build(); |
| 195 | method @NonNull public android.net.NetworkTemplate.Builder setDefaultNetworkStatus(int); |
| 196 | method @NonNull public android.net.NetworkTemplate.Builder setMeteredness(int); |
| 197 | method @NonNull public android.net.NetworkTemplate.Builder setOemManaged(int); |
| 198 | method @NonNull public android.net.NetworkTemplate.Builder setRatType(int); |
| 199 | method @NonNull public android.net.NetworkTemplate.Builder setRoaming(int); |
| 200 | method @NonNull public android.net.NetworkTemplate.Builder setSubscriberIds(@NonNull java.util.Set<java.lang.String>); |
| 201 | method @NonNull public android.net.NetworkTemplate.Builder setWifiNetworkKeys(@NonNull java.util.Set<java.lang.String>); |
| 202 | } |
| 203 | |
| 204 | public class TrafficStats { |
| 205 | method public static void attachSocketTagger(); |
| 206 | method public static void init(@NonNull android.content.Context); |
junyulai | b59e542 | 2022-03-01 17:08:01 +0800 | [diff] [blame^] | 207 | method public static void setThreadStatsTagDownload(); |
Junyu Lai | 2ef865e | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 208 | } |
| 209 | |
| 210 | public final class UnderlyingNetworkInfo implements android.os.Parcelable { |
| 211 | ctor public UnderlyingNetworkInfo(int, @NonNull String, @NonNull java.util.List<java.lang.String>); |
| 212 | method public int describeContents(); |
| 213 | method @NonNull public String getInterface(); |
| 214 | method public int getOwnerUid(); |
| 215 | method @NonNull public java.util.List<java.lang.String> getUnderlyingInterfaces(); |
| 216 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 217 | field @NonNull public static final android.os.Parcelable.Creator<android.net.UnderlyingNetworkInfo> CREATOR; |
| 218 | } |
| 219 | |
paulhu | 667e8fb | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 220 | } |
| 221 | |