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