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