summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Davidson <jpd@google.com> 2016-01-29 10:36:52 -0800
committer Jeff Davidson <jpd@google.com> 2016-01-29 10:36:52 -0800
commit921d15b58a82e426f51abfc0599aff6a384b778c (patch)
tree4081a2e5c45df7048c5094515be34791f76a4dfd
parentc4f7e07b1f57eaf16f1561a730a23f19ea86e355 (diff)
Revert Network Stats API stub for tracking of metered networks.
Bug: 25813958 Change-Id: I9d2835b7bacfffef05b1588f1301afc70f5f582f
-rw-r--r--api/current.txt4
-rw-r--r--api/system-current.txt4
-rw-r--r--api/test-current.txt4
-rw-r--r--core/java/android/app/usage/NetworkStats.java31
4 files changed, 0 insertions, 43 deletions
diff --git a/api/current.txt b/api/current.txt
index 537ae8a7ec70..41b716034f2a 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6319,7 +6319,6 @@ package android.app.usage {
public static class NetworkStats.Bucket {
ctor public NetworkStats.Bucket();
method public long getEndTimeStamp();
- method public int getMetering();
method public int getRoaming();
method public long getRxBytes();
method public long getRxPackets();
@@ -6328,9 +6327,6 @@ package android.app.usage {
method public long getTxBytes();
method public long getTxPackets();
method public int getUid();
- field public static final int METERING_ALL = -1; // 0xffffffff
- field public static final int METERING_DEFAULT = 1; // 0x1
- field public static final int METERING_METERED = 2; // 0x2
field public static final int ROAMING_ALL = -1; // 0xffffffff
field public static final int ROAMING_DEFAULT = 1; // 0x1
field public static final int ROAMING_ROAMING = 2; // 0x2
diff --git a/api/system-current.txt b/api/system-current.txt
index 1091ff13c435..64d119c7afba 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -6576,7 +6576,6 @@ package android.app.usage {
public static class NetworkStats.Bucket {
ctor public NetworkStats.Bucket();
method public long getEndTimeStamp();
- method public int getMetering();
method public int getRoaming();
method public long getRxBytes();
method public long getRxPackets();
@@ -6585,9 +6584,6 @@ package android.app.usage {
method public long getTxBytes();
method public long getTxPackets();
method public int getUid();
- field public static final int METERING_ALL = -1; // 0xffffffff
- field public static final int METERING_DEFAULT = 1; // 0x1
- field public static final int METERING_METERED = 2; // 0x2
field public static final int ROAMING_ALL = -1; // 0xffffffff
field public static final int ROAMING_DEFAULT = 1; // 0x1
field public static final int ROAMING_ROAMING = 2; // 0x2
diff --git a/api/test-current.txt b/api/test-current.txt
index 09a9ccac5779..920b386153de 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -6321,7 +6321,6 @@ package android.app.usage {
public static class NetworkStats.Bucket {
ctor public NetworkStats.Bucket();
method public long getEndTimeStamp();
- method public int getMetering();
method public int getRoaming();
method public long getRxBytes();
method public long getRxPackets();
@@ -6330,9 +6329,6 @@ package android.app.usage {
method public long getTxBytes();
method public long getTxPackets();
method public int getUid();
- field public static final int METERING_ALL = -1; // 0xffffffff
- field public static final int METERING_DEFAULT = 1; // 0x1
- field public static final int METERING_METERED = 2; // 0x2
field public static final int ROAMING_ALL = -1; // 0xffffffff
field public static final int ROAMING_DEFAULT = 1; // 0x1
field public static final int ROAMING_ROAMING = 2; // 0x2
diff --git a/core/java/android/app/usage/NetworkStats.java b/core/java/android/app/usage/NetworkStats.java
index d2636467ca72..5622207941ec 100644
--- a/core/java/android/app/usage/NetworkStats.java
+++ b/core/java/android/app/usage/NetworkStats.java
@@ -151,21 +151,6 @@ public final class NetworkStats implements AutoCloseable {
public static final int UID_TETHERING = TrafficStats.UID_TETHERING;
/**
- * Combined usage across all metering states.
- */
- public static final int METERING_ALL = -1;
-
- /**
- * Usage not accounted for in any other metering state.
- */
- public static final int METERING_DEFAULT = 0x1;
-
- /**
- * Metered usage.
- */
- public static final int METERING_METERED = 0x2;
-
- /**
* Combined usage across all roaming states.
*/
public static final int ROAMING_ALL = -1;
@@ -182,7 +167,6 @@ public final class NetworkStats implements AutoCloseable {
private int mUid;
private int mState;
- private int mMetering;
private int mRoaming;
private long mBeginTimeStamp;
private long mEndTimeStamp;
@@ -247,18 +231,6 @@ public final class NetworkStats implements AutoCloseable {
}
/**
- * Metering state. One of the following values:<p/>
- * <ul>
- * <li>{@link #METERING_ALL}</li>
- * <li>{@link #METERING_DEFAULT}</li>
- * <li>{@link #METERING_METERED}</li>
- * </ul>
- */
- public int getMetering() {
- return mMetering;
- }
-
- /**
* Roaming state. One of the following values:<p/>
* <ul>
* <li>{@link #ROAMING_ALL}</li>
@@ -463,8 +435,6 @@ public final class NetworkStats implements AutoCloseable {
private void fillBucketFromSummaryEntry(Bucket bucketOut) {
bucketOut.mUid = Bucket.convertUid(mRecycledSummaryEntry.uid);
bucketOut.mState = Bucket.convertState(mRecycledSummaryEntry.set);
- // TODO: Implement metering tracking.
- bucketOut.mMetering = Bucket.METERING_ALL;
bucketOut.mRoaming = Bucket.convertRoaming(mRecycledSummaryEntry.roaming);
bucketOut.mBeginTimeStamp = mStartTimeStamp;
bucketOut.mEndTimeStamp = mEndTimeStamp;
@@ -512,7 +482,6 @@ public final class NetworkStats implements AutoCloseable {
mRecycledHistoryEntry);
bucketOut.mUid = Bucket.convertUid(getUid());
bucketOut.mState = Bucket.STATE_ALL;
- bucketOut.mMetering = Bucket.METERING_ALL;
bucketOut.mRoaming = Bucket.ROAMING_ALL;
bucketOut.mBeginTimeStamp = mRecycledHistoryEntry.bucketStart;
bucketOut.mEndTimeStamp = mRecycledHistoryEntry.bucketStart +