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); |
| 7 | 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>); |
| 8 | method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForDevice(@NonNull android.net.NetworkTemplate, long, long); |
| 9 | method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForUidTagState(@NonNull android.net.NetworkTemplate, long, long, int, int, int) throws java.lang.SecurityException; |
| 10 | method @NonNull @WorkerThread public android.app.usage.NetworkStats querySummary(@NonNull android.net.NetworkTemplate, long, long) throws java.lang.SecurityException; |
| 11 | method @NonNull @WorkerThread public android.app.usage.NetworkStats.Bucket querySummaryForDevice(@NonNull android.net.NetworkTemplate, long, long); |
| 12 | method @NonNull @WorkerThread public android.app.usage.NetworkStats queryTaggedSummary(@NonNull android.net.NetworkTemplate, long, long) throws java.lang.SecurityException; |
| 13 | method public void registerUsageCallback(@NonNull android.net.NetworkTemplate, long, @NonNull java.util.concurrent.Executor, @NonNull android.app.usage.NetworkStatsManager.UsageCallback); |
| 14 | 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^] | 15 | method public void setPollForce(boolean); |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 16 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setPollOnOpen(boolean); |
| 17 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setStatsProviderWarningAndLimitAsync(@NonNull String, long, long); |
| 18 | method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setUidForeground(int, boolean); |
| 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 | |
Aaron Huang | 2e778ee | 2022-01-06 19:30:43 +0800 | [diff] [blame] | 34 | public class IpSecManager { |
| 35 | field public static final int DIRECTION_FWD = 2; // 0x2 |
| 36 | } |
| 37 | |
| 38 | public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable { |
| 39 | method public int getResourceId(); |
| 40 | } |
| 41 | |
Junyu Lai | eb6f4be | 2022-01-17 11:52:57 +0000 | [diff] [blame] | 42 | public class NetworkIdentity { |
| 43 | method public int getOemManaged(); |
| 44 | method public int getRatType(); |
| 45 | method @Nullable public String getSubscriberId(); |
| 46 | method public int getType(); |
| 47 | method @Nullable public String getWifiNetworkKey(); |
| 48 | method public boolean isDefaultNetwork(); |
| 49 | method public boolean isMetered(); |
| 50 | method public boolean isRoaming(); |
| 51 | } |
| 52 | |
| 53 | public static final class NetworkIdentity.Builder { |
| 54 | ctor public NetworkIdentity.Builder(); |
| 55 | method @NonNull public android.net.NetworkIdentity build(); |
| 56 | method @NonNull public android.net.NetworkIdentity.Builder clearRatType(); |
| 57 | method @NonNull public android.net.NetworkIdentity.Builder setDefaultNetwork(boolean); |
| 58 | method @NonNull public android.net.NetworkIdentity.Builder setMetered(boolean); |
| 59 | method @NonNull public android.net.NetworkIdentity.Builder setNetworkStateSnapshot(@NonNull android.net.NetworkStateSnapshot); |
| 60 | method @NonNull public android.net.NetworkIdentity.Builder setOemManaged(int); |
| 61 | method @NonNull public android.net.NetworkIdentity.Builder setRatType(int); |
| 62 | method @NonNull public android.net.NetworkIdentity.Builder setRoaming(boolean); |
| 63 | method @NonNull public android.net.NetworkIdentity.Builder setSubscriberId(@Nullable String); |
| 64 | method @NonNull public android.net.NetworkIdentity.Builder setType(int); |
| 65 | method @NonNull public android.net.NetworkIdentity.Builder setWifiNetworkKey(@Nullable String); |
| 66 | } |
| 67 | |
| 68 | public final class NetworkStateSnapshot implements android.os.Parcelable { |
| 69 | ctor public NetworkStateSnapshot(@NonNull android.net.Network, @NonNull android.net.NetworkCapabilities, @NonNull android.net.LinkProperties, @Nullable String, int); |
| 70 | method public int describeContents(); |
| 71 | method public int getLegacyType(); |
| 72 | method @NonNull public android.net.LinkProperties getLinkProperties(); |
| 73 | method @NonNull public android.net.Network getNetwork(); |
| 74 | method @NonNull public android.net.NetworkCapabilities getNetworkCapabilities(); |
| 75 | method @Nullable public String getSubscriberId(); |
| 76 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 77 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStateSnapshot> CREATOR; |
| 78 | } |
| 79 | |
| 80 | public class NetworkStatsCollection { |
| 81 | method @NonNull public java.util.Map<android.net.NetworkStatsCollection.Key,android.net.NetworkStatsHistory> getEntries(); |
| 82 | } |
| 83 | |
| 84 | public static final class NetworkStatsCollection.Builder { |
| 85 | ctor public NetworkStatsCollection.Builder(long); |
| 86 | method @NonNull public android.net.NetworkStatsCollection.Builder addEntry(@NonNull android.net.NetworkStatsCollection.Key, @NonNull android.net.NetworkStatsHistory); |
| 87 | method @NonNull public android.net.NetworkStatsCollection build(); |
| 88 | } |
| 89 | |
| 90 | public static class NetworkStatsCollection.Key { |
| 91 | ctor public NetworkStatsCollection.Key(@NonNull java.util.Set<android.net.NetworkIdentity>, int, int, int); |
| 92 | } |
| 93 | |
| 94 | public final class NetworkStatsHistory implements android.os.Parcelable { |
| 95 | method public int describeContents(); |
| 96 | method @NonNull public java.util.List<android.net.NetworkStatsHistory.Entry> getEntries(); |
| 97 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 98 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStatsHistory> CREATOR; |
| 99 | } |
| 100 | |
| 101 | public static final class NetworkStatsHistory.Builder { |
| 102 | ctor public NetworkStatsHistory.Builder(long, int); |
| 103 | method @NonNull public android.net.NetworkStatsHistory.Builder addEntry(@NonNull android.net.NetworkStatsHistory.Entry); |
| 104 | method @NonNull public android.net.NetworkStatsHistory build(); |
| 105 | } |
| 106 | |
| 107 | public static final class NetworkStatsHistory.Entry { |
| 108 | ctor public NetworkStatsHistory.Entry(long, long, long, long, long, long, long); |
| 109 | method public long getActiveTime(); |
| 110 | method public long getBucketStart(); |
| 111 | method public long getOperations(); |
| 112 | method public long getRxBytes(); |
| 113 | method public long getRxPackets(); |
| 114 | method public long getTxBytes(); |
| 115 | method public long getTxPackets(); |
| 116 | } |
| 117 | |
| 118 | public final class NetworkTemplate implements android.os.Parcelable { |
| 119 | method public int describeContents(); |
| 120 | method public int getDefaultNetworkStatus(); |
| 121 | method public int getMatchRule(); |
| 122 | method public int getMeteredness(); |
| 123 | method public int getOemManaged(); |
| 124 | method public int getRatType(); |
| 125 | method public int getRoaming(); |
| 126 | method @NonNull public java.util.Set<java.lang.String> getSubscriberIds(); |
| 127 | method @NonNull public java.util.Set<java.lang.String> getWifiNetworkKeys(); |
| 128 | method public boolean matches(@NonNull android.net.NetworkIdentity); |
| 129 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 130 | field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkTemplate> CREATOR; |
| 131 | field public static final int MATCH_BLUETOOTH = 8; // 0x8 |
| 132 | field public static final int MATCH_CARRIER = 10; // 0xa |
| 133 | field public static final int MATCH_ETHERNET = 5; // 0x5 |
| 134 | field public static final int MATCH_MOBILE = 1; // 0x1 |
| 135 | field public static final int MATCH_WIFI = 4; // 0x4 |
| 136 | field public static final int NETWORK_TYPE_ALL = -1; // 0xffffffff |
| 137 | field public static final int OEM_MANAGED_ALL = -1; // 0xffffffff |
| 138 | field public static final int OEM_MANAGED_NO = 0; // 0x0 |
| 139 | field public static final int OEM_MANAGED_PAID = 1; // 0x1 |
| 140 | field public static final int OEM_MANAGED_PRIVATE = 2; // 0x2 |
| 141 | field public static final int OEM_MANAGED_YES = -2; // 0xfffffffe |
| 142 | } |
| 143 | |
| 144 | public static final class NetworkTemplate.Builder { |
| 145 | ctor public NetworkTemplate.Builder(int); |
| 146 | method @NonNull public android.net.NetworkTemplate build(); |
| 147 | method @NonNull public android.net.NetworkTemplate.Builder setDefaultNetworkStatus(int); |
| 148 | method @NonNull public android.net.NetworkTemplate.Builder setMeteredness(int); |
| 149 | method @NonNull public android.net.NetworkTemplate.Builder setOemManaged(int); |
| 150 | method @NonNull public android.net.NetworkTemplate.Builder setRatType(int); |
| 151 | method @NonNull public android.net.NetworkTemplate.Builder setRoaming(int); |
| 152 | method @NonNull public android.net.NetworkTemplate.Builder setSubscriberIds(@NonNull java.util.Set<java.lang.String>); |
| 153 | method @NonNull public android.net.NetworkTemplate.Builder setWifiNetworkKeys(@NonNull java.util.Set<java.lang.String>); |
| 154 | } |
| 155 | |
| 156 | public class TrafficStats { |
| 157 | method public static void attachSocketTagger(); |
| 158 | method public static void init(@NonNull android.content.Context); |
| 159 | } |
| 160 | |
| 161 | public final class UnderlyingNetworkInfo implements android.os.Parcelable { |
| 162 | ctor public UnderlyingNetworkInfo(int, @NonNull String, @NonNull java.util.List<java.lang.String>); |
| 163 | method public int describeContents(); |
| 164 | method @NonNull public String getInterface(); |
| 165 | method public int getOwnerUid(); |
| 166 | method @NonNull public java.util.List<java.lang.String> getUnderlyingInterfaces(); |
| 167 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 168 | field @NonNull public static final android.os.Parcelable.Creator<android.net.UnderlyingNetworkInfo> CREATOR; |
| 169 | } |
| 170 | |
paulhu | 802ab97 | 2021-12-14 01:30:22 +0000 | [diff] [blame] | 171 | } |
| 172 | |