Merge "Cleaning up NetworkStatsManager." into nyc-dev am: c45f0aea71 am: f49cbec84c
am: cc1524eded * commit 'cc1524edede07e2139cd072d6256fa96952f4004': Cleaning up NetworkStatsManager. Change-Id: I3f669191e7c7739870dc098d5d6357d1d3ceb6dd
This commit is contained in:
@@ -240,18 +240,13 @@ public class NetworkStatsManager {
|
||||
* {@link java.lang.System#currentTimeMillis}.
|
||||
* @param uid UID of app
|
||||
* @param tag TAG of interest. Use {@link NetworkStats.Bucket#TAG_NONE} for no tags.
|
||||
* @return Statistics object or null if permissions are insufficient or error happened during
|
||||
* statistics collection.
|
||||
* @return Statistics object or null if an error happened during statistics collection.
|
||||
* @throws SecurityException if permissions are insufficient to read network statistics.
|
||||
*/
|
||||
public NetworkStats queryDetailsForUidTag(int networkType, String subscriberId,
|
||||
long startTime, long endTime, int uid, int tag) {
|
||||
long startTime, long endTime, int uid, int tag) throws SecurityException {
|
||||
NetworkTemplate template;
|
||||
try {
|
||||
template = createTemplate(networkType, subscriberId);
|
||||
} catch (IllegalArgumentException e) {
|
||||
if (DBG) Log.e(TAG, "Cannot create template", e);
|
||||
return null;
|
||||
}
|
||||
template = createTemplate(networkType, subscriberId);
|
||||
|
||||
NetworkStats result;
|
||||
try {
|
||||
@@ -303,17 +298,6 @@ public class NetworkStatsManager {
|
||||
return result;
|
||||
}
|
||||
|
||||
/** @removed */
|
||||
public void registerDataUsageCallback(DataUsagePolicy policy, DataUsageCallback callback,
|
||||
@Nullable Handler handler) {}
|
||||
|
||||
/** @removed */
|
||||
public void registerDataUsageCallback(DataUsagePolicy policy, UsageCallback callback,
|
||||
@Nullable Handler handler) {}
|
||||
|
||||
/** @removed */
|
||||
public void unregisterDataUsageCallback(DataUsageCallback callback) {}
|
||||
|
||||
/**
|
||||
* Registers to receive notifications about data usage on specified networks.
|
||||
*
|
||||
@@ -396,13 +380,6 @@ public class NetworkStatsManager {
|
||||
}
|
||||
}
|
||||
|
||||
/** @removed */
|
||||
public static abstract class DataUsageCallback {
|
||||
/** @removed */
|
||||
@Deprecated
|
||||
public void onLimitReached() {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for usage callbacks. Should be extended by applications wanting notifications.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user