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 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 | dd1d024 | 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 | eb6f4be | 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 | eeeb76d | 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 | eb6f4be | 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 | 73a61e7 | 2022-02-03 11:32:46 +0900 | [diff] [blame] | 18 | method public void setPollForce(boolean); |
Junyu Lai | eb6f4be | 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 | eb6f4be | 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 | |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 30 | package android.net { |
| 31 | |
| 32 | public final class ConnectivityFrameworkInitializerTiramisu { |
| 33 | method public static void registerServiceWrappers(); |
| 34 | } |
| 35 | |
Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 36 | public class EthernetManager { |
markchien | e1cde26 | 2022-03-17 16:34:20 +0800 | [diff] [blame] | 37 | method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void addEthernetStateListener(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.IntConsumer); |
Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 38 | method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void addInterfaceStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.EthernetManager.InterfaceStateListener); |
Xiao Ma | bdfed34 | 2022-03-17 05:58:28 +0000 | [diff] [blame] | 39 | method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public java.util.List<java.lang.String> getInterfaceList(); |
markchien | e1cde26 | 2022-03-17 16:34:20 +0800 | [diff] [blame] | 40 | method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void removeEthernetStateListener(@NonNull java.util.function.IntConsumer); |
Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 41 | method public void removeInterfaceStateListener(@NonNull android.net.EthernetManager.InterfaceStateListener); |
markchien | e1cde26 | 2022-03-17 16:34:20 +0800 | [diff] [blame] | 42 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void setEthernetEnabled(boolean); |
Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 43 | method public void setIncludeTestInterfaces(boolean); |
markchien | e1cde26 | 2022-03-17 16:34:20 +0800 | [diff] [blame] | 44 | field public static final int ETHERNET_STATE_DISABLED = 0; // 0x0 |
| 45 | field public static final int ETHERNET_STATE_ENABLED = 1; // 0x1 |
Xiao Ma | 0a171c0 | 2022-01-23 16:14:51 +0000 | [diff] [blame] | 46 | field public static final int ROLE_CLIENT = 1; // 0x1 |
| 47 | field public static final int ROLE_NONE = 0; // 0x0 |
| 48 | field public static final int ROLE_SERVER = 2; // 0x2 |
| 49 | field public static final int STATE_ABSENT = 0; // 0x0 |
| 50 | field public static final int STATE_LINK_DOWN = 1; // 0x1 |
| 51 | field public static final int STATE_LINK_UP = 2; // 0x2 |
| 52 | } |
| 53 | |
| 54 | public static interface EthernetManager.InterfaceStateListener { |
| 55 | method public void onInterfaceStateChanged(@NonNull String, int, int, @Nullable android.net.IpConfiguration); |
| 56 | } |
| 57 | |
Aaron Huang | 2e778ee | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 58 | public class IpSecManager { |
| 59 | field public static final int DIRECTION_FWD = 2; // 0x2 |
| 60 | } |
| 61 | |
| 62 | public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable { |
| 63 | method public int getResourceId(); |
| 64 | } |
| 65 | |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 66 | public class NetworkIdentity { |
| 67 | method public int getOemManaged(); |
| 68 | method public int getRatType(); |
lifr | 8ba46d8 | 2021-11-18 02:37:28 +0800 | [diff] [blame] | 69 | method public int getSubId(); |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 70 | method @Nullable public String getSubscriberId(); |
| 71 | method public int getType(); |
| 72 | method @Nullable public String getWifiNetworkKey(); |
| 73 | method public boolean isDefaultNetwork(); |
| 74 | method public boolean isMetered(); |
| 75 | method public boolean isRoaming(); |
| 76 | } |
| 77 | |
| 78 | public static final class NetworkIdentity.Builder { |
| 79 | ctor public NetworkIdentity.Builder(); |
| 80 | method @NonNull public android.net.NetworkIdentity build(); |
| 81 | method @NonNull public android.net.NetworkIdentity.Builder clearRatType(); |
| 82 | method @NonNull public android.net.NetworkIdentity.Builder setDefaultNetwork(boolean); |
| 83 | method @NonNull public android.net.NetworkIdentity.Builder setMetered(boolean); |
| 84 | method @NonNull public android.net.NetworkIdentity.Builder setNetworkStateSnapshot(@NonNull android.net.NetworkStateSnapshot); |
| 85 | method @NonNull public android.net.NetworkIdentity.Builder setOemManaged(int); |
| 86 | method @NonNull public android.net.NetworkIdentity.Builder setRatType(int); |
| 87 | method @NonNull public android.net.NetworkIdentity.Builder setRoaming(boolean); |
lifr | 8ba46d8 | 2021-11-18 02:37:28 +0800 | [diff] [blame] | 88 | method @NonNull public android.net.NetworkIdentity.Builder setSubId(int); |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 89 | method @NonNull public android.net.NetworkIdentity.Builder setSubscriberId(@Nullable String); |
| 90 | method @NonNull public android.net.NetworkIdentity.Builder setType(int); |
| 91 | method @NonNull public android.net.NetworkIdentity.Builder setWifiNetworkKey(@Nullable String); |
| 92 | } |
| 93 | |
| 94 | public final class NetworkStateSnapshot implements android.os.Parcelable { |
| 95 | ctor public NetworkStateSnapshot(@NonNull android.net.Network, @NonNull android.net.NetworkCapabilities, @NonNull android.net.LinkProperties, @Nullable String, int); |
| 96 | method public int describeContents(); |
| 97 | method public int getLegacyType(); |
| 98 | method @NonNull public android.net.LinkProperties getLinkProperties(); |
| 99 | method @NonNull public android.net.Network getNetwork(); |
| 100 | method @NonNull public android.net.NetworkCapabilities getNetworkCapabilities(); |
lifr | 8ba46d8 | 2021-11-18 02:37:28 +0800 | [diff] [blame] | 101 | method public int getSubId(); |
| 102 | method @Deprecated @Nullable public String getSubscriberId(); |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 103 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 104 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStateSnapshot> CREATOR; |
| 105 | } |
| 106 | |
| 107 | public class NetworkStatsCollection { |
| 108 | method @NonNull public java.util.Map<android.net.NetworkStatsCollection.Key,android.net.NetworkStatsHistory> getEntries(); |
| 109 | } |
| 110 | |
| 111 | public static final class NetworkStatsCollection.Builder { |
| 112 | ctor public NetworkStatsCollection.Builder(long); |
| 113 | method @NonNull public android.net.NetworkStatsCollection.Builder addEntry(@NonNull android.net.NetworkStatsCollection.Key, @NonNull android.net.NetworkStatsHistory); |
| 114 | method @NonNull public android.net.NetworkStatsCollection build(); |
| 115 | } |
| 116 | |
Frank | 349fadf | 2022-03-07 16:31:26 +0800 | [diff] [blame] | 117 | public static final class NetworkStatsCollection.Key { |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 118 | ctor public NetworkStatsCollection.Key(@NonNull java.util.Set<android.net.NetworkIdentity>, int, int, int); |
| 119 | } |
| 120 | |
| 121 | public final class NetworkStatsHistory implements android.os.Parcelable { |
| 122 | method public int describeContents(); |
| 123 | method @NonNull public java.util.List<android.net.NetworkStatsHistory.Entry> getEntries(); |
| 124 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 125 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStatsHistory> CREATOR; |
| 126 | } |
| 127 | |
| 128 | public static final class NetworkStatsHistory.Builder { |
| 129 | ctor public NetworkStatsHistory.Builder(long, int); |
| 130 | method @NonNull public android.net.NetworkStatsHistory.Builder addEntry(@NonNull android.net.NetworkStatsHistory.Entry); |
| 131 | method @NonNull public android.net.NetworkStatsHistory build(); |
| 132 | } |
| 133 | |
| 134 | public static final class NetworkStatsHistory.Entry { |
| 135 | ctor public NetworkStatsHistory.Entry(long, long, long, long, long, long, long); |
| 136 | method public long getActiveTime(); |
| 137 | method public long getBucketStart(); |
| 138 | method public long getOperations(); |
| 139 | method public long getRxBytes(); |
| 140 | method public long getRxPackets(); |
| 141 | method public long getTxBytes(); |
| 142 | method public long getTxPackets(); |
| 143 | } |
| 144 | |
| 145 | public final class NetworkTemplate implements android.os.Parcelable { |
| 146 | method public int describeContents(); |
| 147 | method public int getDefaultNetworkStatus(); |
| 148 | method public int getMatchRule(); |
| 149 | method public int getMeteredness(); |
| 150 | method public int getOemManaged(); |
| 151 | method public int getRatType(); |
| 152 | method public int getRoaming(); |
| 153 | method @NonNull public java.util.Set<java.lang.String> getSubscriberIds(); |
| 154 | method @NonNull public java.util.Set<java.lang.String> getWifiNetworkKeys(); |
| 155 | method public boolean matches(@NonNull android.net.NetworkIdentity); |
| 156 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 157 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkTemplate> CREATOR; |
| 158 | field public static final int MATCH_BLUETOOTH = 8; // 0x8 |
| 159 | field public static final int MATCH_CARRIER = 10; // 0xa |
| 160 | field public static final int MATCH_ETHERNET = 5; // 0x5 |
| 161 | field public static final int MATCH_MOBILE = 1; // 0x1 |
Lorenzo Colitti | 9e066c9 | 2022-02-04 03:08:12 +0900 | [diff] [blame] | 162 | field public static final int MATCH_PROXY = 9; // 0x9 |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 163 | field public static final int MATCH_WIFI = 4; // 0x4 |
| 164 | field public static final int NETWORK_TYPE_ALL = -1; // 0xffffffff |
| 165 | field public static final int OEM_MANAGED_ALL = -1; // 0xffffffff |
| 166 | field public static final int OEM_MANAGED_NO = 0; // 0x0 |
| 167 | field public static final int OEM_MANAGED_PAID = 1; // 0x1 |
| 168 | field public static final int OEM_MANAGED_PRIVATE = 2; // 0x2 |
| 169 | field public static final int OEM_MANAGED_YES = -2; // 0xfffffffe |
| 170 | } |
| 171 | |
| 172 | public static final class NetworkTemplate.Builder { |
| 173 | ctor public NetworkTemplate.Builder(int); |
| 174 | method @NonNull public android.net.NetworkTemplate build(); |
| 175 | method @NonNull public android.net.NetworkTemplate.Builder setDefaultNetworkStatus(int); |
| 176 | method @NonNull public android.net.NetworkTemplate.Builder setMeteredness(int); |
| 177 | method @NonNull public android.net.NetworkTemplate.Builder setOemManaged(int); |
| 178 | method @NonNull public android.net.NetworkTemplate.Builder setRatType(int); |
| 179 | method @NonNull public android.net.NetworkTemplate.Builder setRoaming(int); |
| 180 | method @NonNull public android.net.NetworkTemplate.Builder setSubscriberIds(@NonNull java.util.Set<java.lang.String>); |
| 181 | method @NonNull public android.net.NetworkTemplate.Builder setWifiNetworkKeys(@NonNull java.util.Set<java.lang.String>); |
| 182 | } |
| 183 | |
| 184 | public class TrafficStats { |
| 185 | method public static void attachSocketTagger(); |
| 186 | method public static void init(@NonNull android.content.Context); |
junyulai | dd1d024 | 2022-03-01 17:08:01 +0800 | [diff] [blame] | 187 | method public static void setThreadStatsTagDownload(); |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | public final class UnderlyingNetworkInfo implements android.os.Parcelable { |
| 191 | ctor public UnderlyingNetworkInfo(int, @NonNull String, @NonNull java.util.List<java.lang.String>); |
| 192 | method public int describeContents(); |
| 193 | method @NonNull public String getInterface(); |
| 194 | method public int getOwnerUid(); |
| 195 | method @NonNull public java.util.List<java.lang.String> getUnderlyingInterfaces(); |
| 196 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 197 | field @NonNull public static final android.os.Parcelable.Creator<android.net.UnderlyingNetworkInfo> CREATOR; |
| 198 | } |
| 199 | |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 200 | } |
| 201 | |