// Signature format: 2.0 package android.app.usage { public class NetworkStatsManager { method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void forceUpdate(); method public static int getCollapsedRatType(int); method @NonNull @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public android.net.NetworkStats getMobileUidStats(); method @NonNull @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public android.net.NetworkStats getWifiUidStats(); method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void noteUidForeground(int, boolean); method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void notifyNetworkStatus(@NonNull java.util.List, @NonNull java.util.List, @Nullable String, @NonNull java.util.List); method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForDevice(@NonNull android.net.NetworkTemplate, long, long); method @NonNull @WorkerThread public android.app.usage.NetworkStats queryDetailsForUidTagState(@NonNull android.net.NetworkTemplate, long, long, int, int, int) throws java.lang.SecurityException; method @NonNull @WorkerThread public android.app.usage.NetworkStats querySummary(@NonNull android.net.NetworkTemplate, long, long) throws java.lang.SecurityException; method @NonNull @WorkerThread public android.app.usage.NetworkStats.Bucket querySummaryForDevice(@NonNull android.net.NetworkTemplate, long, long); method @NonNull @WorkerThread public android.app.usage.NetworkStats queryTaggedSummary(@NonNull android.net.NetworkTemplate, long, long) throws java.lang.SecurityException; 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); method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setDefaultGlobalAlert(long); method public void setPollForce(boolean); method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setPollOnOpen(boolean); method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void setStatsProviderWarningAndLimitAsync(@NonNull String, long, long); field public static final int NETWORK_TYPE_5G_NSA = -2; // 0xfffffffe } public abstract static class NetworkStatsManager.UsageCallback { method public void onThresholdReached(@NonNull android.net.NetworkTemplate); } } package android.nearby { public final class NearbyFrameworkInitializer { method public static void registerServiceWrappers(); } } package android.net { public final class ConnectivityFrameworkInitializerTiramisu { method public static void registerServiceWrappers(); } public class EthernetManager { method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void addEthernetStateListener(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.IntConsumer); method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void addInterfaceStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.EthernetManager.InterfaceStateListener); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public String[] getAvailableInterfaces(); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public android.net.IpConfiguration getConfiguration(@NonNull String); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public String getDns(@NonNull String); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public String getGateway(@NonNull String); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public java.util.List getInterfaceList(); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public String getIpAddress(@NonNull String); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public String getNetmask(@NonNull String); method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void removeEthernetStateListener(@NonNull java.util.function.IntConsumer); method public void removeInterfaceStateListener(@NonNull android.net.EthernetManager.InterfaceStateListener); method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void setConfiguration(@NonNull String, @NonNull android.net.IpConfiguration); method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.NETWORK_SETTINGS}) public void setEthernetEnabled(boolean); method public void setIncludeTestInterfaces(boolean); field public static final int ETHERNET_STATE_DISABLED = 0; // 0x0 field public static final int ETHERNET_STATE_ENABLED = 1; // 0x1 field public static final int ROLE_CLIENT = 1; // 0x1 field public static final int ROLE_NONE = 0; // 0x0 field public static final int ROLE_SERVER = 2; // 0x2 field public static final int STATE_ABSENT = 0; // 0x0 field public static final int STATE_LINK_DOWN = 1; // 0x1 field public static final int STATE_LINK_UP = 2; // 0x2 } public static interface EthernetManager.InterfaceStateListener { method public void onInterfaceStateChanged(@NonNull String, int, int, @Nullable android.net.IpConfiguration); } public class IpSecManager { field public static final int DIRECTION_FWD = 2; // 0x2 } public static final class IpSecManager.UdpEncapsulationSocket implements java.lang.AutoCloseable { method public int getResourceId(); } public class NetworkIdentity { method public int getOemManaged(); method public int getRatType(); method public int getSubId(); method @Nullable public String getSubscriberId(); method public int getType(); method @Nullable public String getWifiNetworkKey(); method public boolean isDefaultNetwork(); method public boolean isMetered(); method public boolean isRoaming(); } public static final class NetworkIdentity.Builder { ctor public NetworkIdentity.Builder(); method @NonNull public android.net.NetworkIdentity build(); method @NonNull public android.net.NetworkIdentity.Builder clearRatType(); method @NonNull public android.net.NetworkIdentity.Builder setDefaultNetwork(boolean); method @NonNull public android.net.NetworkIdentity.Builder setMetered(boolean); method @NonNull public android.net.NetworkIdentity.Builder setNetworkStateSnapshot(@NonNull android.net.NetworkStateSnapshot); method @NonNull public android.net.NetworkIdentity.Builder setOemManaged(int); method @NonNull public android.net.NetworkIdentity.Builder setRatType(int); method @NonNull public android.net.NetworkIdentity.Builder setRoaming(boolean); method @NonNull public android.net.NetworkIdentity.Builder setSubId(int); method @NonNull public android.net.NetworkIdentity.Builder setSubscriberId(@Nullable String); method @NonNull public android.net.NetworkIdentity.Builder setType(int); method @NonNull public android.net.NetworkIdentity.Builder setWifiNetworkKey(@Nullable String); } public final class NetworkStateSnapshot implements android.os.Parcelable { ctor public NetworkStateSnapshot(@NonNull android.net.Network, @NonNull android.net.NetworkCapabilities, @NonNull android.net.LinkProperties, @Nullable String, int); method public int describeContents(); method public int getLegacyType(); method @NonNull public android.net.LinkProperties getLinkProperties(); method @NonNull public android.net.Network getNetwork(); method @NonNull public android.net.NetworkCapabilities getNetworkCapabilities(); method public int getSubId(); method @Deprecated @Nullable public String getSubscriberId(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } public class NetworkStatsCollection { method @NonNull public java.util.Map getEntries(); } public static final class NetworkStatsCollection.Builder { ctor public NetworkStatsCollection.Builder(long); method @NonNull public android.net.NetworkStatsCollection.Builder addEntry(@NonNull android.net.NetworkStatsCollection.Key, @NonNull android.net.NetworkStatsHistory); method @NonNull public android.net.NetworkStatsCollection build(); } public static final class NetworkStatsCollection.Key { ctor public NetworkStatsCollection.Key(@NonNull java.util.Set, int, int, int); } public final class NetworkStatsHistory implements android.os.Parcelable { method public int describeContents(); method @NonNull public java.util.List getEntries(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } public static final class NetworkStatsHistory.Builder { ctor public NetworkStatsHistory.Builder(long, int); method @NonNull public android.net.NetworkStatsHistory.Builder addEntry(@NonNull android.net.NetworkStatsHistory.Entry); method @NonNull public android.net.NetworkStatsHistory build(); } public static final class NetworkStatsHistory.Entry { ctor public NetworkStatsHistory.Entry(long, long, long, long, long, long, long); method public long getActiveTime(); method public long getBucketStart(); method public long getOperations(); method public long getRxBytes(); method public long getRxPackets(); method public long getTxBytes(); method public long getTxPackets(); } public final class NetworkTemplate implements android.os.Parcelable { method public int describeContents(); method public int getDefaultNetworkStatus(); method public int getMatchRule(); method public int getMeteredness(); method public int getOemManaged(); method public int getRatType(); method public int getRoaming(); method @NonNull public java.util.Set getSubscriberIds(); method @NonNull public java.util.Set getWifiNetworkKeys(); method public boolean matches(@NonNull android.net.NetworkIdentity); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; field public static final int MATCH_BLUETOOTH = 8; // 0x8 field public static final int MATCH_CARRIER = 10; // 0xa field public static final int MATCH_ETHERNET = 5; // 0x5 field public static final int MATCH_MOBILE = 1; // 0x1 field public static final int MATCH_PROXY = 9; // 0x9 field public static final int MATCH_WIFI = 4; // 0x4 field public static final int NETWORK_TYPE_ALL = -1; // 0xffffffff field public static final int OEM_MANAGED_ALL = -1; // 0xffffffff field public static final int OEM_MANAGED_NO = 0; // 0x0 field public static final int OEM_MANAGED_PAID = 1; // 0x1 field public static final int OEM_MANAGED_PRIVATE = 2; // 0x2 field public static final int OEM_MANAGED_YES = -2; // 0xfffffffe } public static final class NetworkTemplate.Builder { ctor public NetworkTemplate.Builder(int); method @NonNull public android.net.NetworkTemplate build(); method @NonNull public android.net.NetworkTemplate.Builder setDefaultNetworkStatus(int); method @NonNull public android.net.NetworkTemplate.Builder setMeteredness(int); method @NonNull public android.net.NetworkTemplate.Builder setOemManaged(int); method @NonNull public android.net.NetworkTemplate.Builder setRatType(int); method @NonNull public android.net.NetworkTemplate.Builder setRoaming(int); method @NonNull public android.net.NetworkTemplate.Builder setSubscriberIds(@NonNull java.util.Set); method @NonNull public android.net.NetworkTemplate.Builder setWifiNetworkKeys(@NonNull java.util.Set); } public class TrafficStats { method public static void attachSocketTagger(); method public static void init(@NonNull android.content.Context); method public static void setThreadStatsTagDownload(); } public final class UnderlyingNetworkInfo implements android.os.Parcelable { ctor public UnderlyingNetworkInfo(int, @NonNull String, @NonNull java.util.List); method public int describeContents(); method @NonNull public String getInterface(); method public int getOwnerUid(); method @NonNull public java.util.List getUnderlyingInterfaces(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } }