Merge changes from topic "ms83-module-lib" am: 4513595a54
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2046384
Change-Id: Ia0ad3181be6de184fe9ff7d2d293c39134ddf06d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/framework-t/api/module-lib-current.txt b/framework-t/api/module-lib-current.txt
index 8eef552..c1f7b39 100644
--- a/framework-t/api/module-lib-current.txt
+++ b/framework-t/api/module-lib-current.txt
@@ -104,24 +104,6 @@
field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStateSnapshot> CREATOR;
}
- public final class NetworkStats implements java.lang.Iterable<android.net.NetworkStats.Entry> android.os.Parcelable {
- method @NonNull public java.util.Iterator<android.net.NetworkStats.Entry> iterator();
- }
-
- public static class NetworkStats.Entry {
- method public int getDefaultNetwork();
- method public int getMetered();
- method public long getOperations();
- method public int getRoaming();
- method public long getRxBytes();
- method public long getRxPackets();
- method public int getSet();
- method public int getTag();
- method public long getTxBytes();
- method public long getTxPackets();
- method public int getUid();
- }
-
public class NetworkStatsCollection {
method @NonNull public java.util.Map<android.net.NetworkStatsCollection.Key,android.net.NetworkStatsHistory> getEntries();
}
diff --git a/framework-t/api/system-current.txt b/framework-t/api/system-current.txt
index b8ede59..6460fed 100644
--- a/framework-t/api/system-current.txt
+++ b/framework-t/api/system-current.txt
@@ -71,6 +71,7 @@
method @NonNull public android.net.NetworkStats add(@NonNull android.net.NetworkStats);
method @NonNull public android.net.NetworkStats addEntry(@NonNull android.net.NetworkStats.Entry);
method public int describeContents();
+ method @NonNull public java.util.Iterator<android.net.NetworkStats.Entry> iterator();
method @NonNull public android.net.NetworkStats subtract(@NonNull android.net.NetworkStats);
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStats> CREATOR;
@@ -94,6 +95,17 @@
public static class NetworkStats.Entry {
ctor public NetworkStats.Entry(@Nullable String, int, int, int, int, int, int, long, long, long, long, long);
+ method public int getDefaultNetwork();
+ method public int getMetered();
+ method public long getOperations();
+ method public int getRoaming();
+ method public long getRxBytes();
+ method public long getRxPackets();
+ method public int getSet();
+ method public int getTag();
+ method public long getTxBytes();
+ method public long getTxPackets();
+ method public int getUid();
}
public class TrafficStats {
diff --git a/framework-t/src/android/net/NetworkStats.java b/framework-t/src/android/net/NetworkStats.java
index bcfeab9..51ff5ec 100644
--- a/framework-t/src/android/net/NetworkStats.java
+++ b/framework-t/src/android/net/NetworkStats.java
@@ -16,8 +16,6 @@
package android.net;
-import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
-
import static com.android.net.module.util.NetworkStatsUtils.multiplySafeByRational;
import android.annotation.IntDef;
@@ -391,102 +389,80 @@
/**
* @return the uid of this entry.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
public int getUid() {
return uid;
}
/**
* @return the set state of this entry.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
@State public int getSet() {
return set;
}
/**
* @return the tag value of this entry.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
public int getTag() {
return tag;
}
/**
* @return the metered state.
- * @hide
*/
@Meteredness
- @SystemApi(client = MODULE_LIBRARIES)
public int getMetered() {
return metered;
}
/**
* @return the roaming state.
- * @hide
*/
@Roaming
- @SystemApi(client = MODULE_LIBRARIES)
public int getRoaming() {
return roaming;
}
/**
* @return the default network state.
- * @hide
*/
@DefaultNetwork
- @SystemApi(client = MODULE_LIBRARIES)
public int getDefaultNetwork() {
return defaultNetwork;
}
/**
* @return the number of received bytes.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
public long getRxBytes() {
return rxBytes;
}
/**
* @return the number of received packets.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
public long getRxPackets() {
return rxPackets;
}
/**
* @return the number of transmitted bytes.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
public long getTxBytes() {
return txBytes;
}
/**
* @return the number of transmitted packets.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
public long getTxPackets() {
return txPackets;
}
/**
* @return the count of network operations performed for this entry.
- * @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
public long getOperations() {
return operations;
}
@@ -708,7 +684,7 @@
* The remove() method is not implemented and will throw UnsupportedOperationException.
* @hide
*/
- @SystemApi(client = MODULE_LIBRARIES)
+ @SystemApi
@NonNull public Iterator<Entry> iterator() {
return new Iterator<Entry>() {
int mIndex = 0;