Merge "Merge "Add tether offload traffic to interface stats as well." into oc-mr1-dev am: 21bc3a39a4 am: 1af850fdfe"

This commit is contained in:
Android Build Merger (Role)
2017-08-19 01:16:26 +00:00
committed by Android (Google) Code Review
9 changed files with 89 additions and 27 deletions

View File

@@ -30,7 +30,10 @@ import android.net.NetworkStats;
*/
interface ITetheringStatsProvider {
// Returns cumulative statistics for all tethering sessions since boot, on all upstreams.
NetworkStats getTetherStats();
// @code {how} is one of the NetworkStats.STATS_PER_* constants. If {@code how} is
// {@code STATS_PER_IFACE}, the provider should not include any traffic that is already
// counted by kernel interface counters.
NetworkStats getTetherStats(int how);
// Sets the interface quota for the specified upstream interface. This is defined as the number
// of bytes, starting from zero and counting from now, after which data should stop being

View File

@@ -82,6 +82,11 @@ public class NetworkStats implements Parcelable {
/** {@link #roaming} value where roaming data is accounted. */
public static final int ROAMING_YES = 1;
/** Denotes a request for stats at the interface level. */
public static final int STATS_PER_IFACE = 0;
/** Denotes a request for stats at the interface and UID level. */
public static final int STATS_PER_UID = 1;
// TODO: move fields to "mVariable" notation
/**

View File

@@ -281,7 +281,7 @@ interface INetworkManagementService
/**
* Return summary of network statistics all tethering interfaces.
*/
NetworkStats getNetworkStatsTethering();
NetworkStats getNetworkStatsTethering(int how);
/**
* Set quota for an interface.