diff options
| author | junyulai <junyulai@google.com> | 2022-03-28 15:39:12 +0800 |
|---|---|---|
| committer | junyulai <junyulai@google.com> | 2022-04-11 18:45:36 +0800 |
| commit | 0f54d64db2d98701597b1961f23dd2e6c0919564 (patch) | |
| tree | d960abdc01dd491350cf57e02dc419ef1b8ec583 /framework-t/src | |
| parent | dd1d02415d0c0c87ea4dfde9295950f4e86f5853 (diff) | |
Make some NetworkStats APIs system-current
Move iterator and NetworkStats.Entry getters to system-current
according to API council feedback. This reverts parts of
ag/17117903.
Test: TH
Fix: 225168182
(cherry-picked from ag/17397294)
Change-Id: Ia7fdf8d31a96a26b0bf1682f462292b051560477
Merged-In: Ia7fdf8d31a96a26b0bf1682f462292b051560477
Diffstat (limited to 'framework-t/src')
| -rw-r--r-- | framework-t/src/android/net/NetworkStats.java | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/framework-t/src/android/net/NetworkStats.java b/framework-t/src/android/net/NetworkStats.java index bcfeab9608..51ff5ec7ad 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 @@ public final class NetworkStats implements Parcelable, Iterable<NetworkStats.Ent /** * @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 @@ public final class NetworkStats implements Parcelable, Iterable<NetworkStats.Ent * 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; |
