Interface-level network policy, persist policies.
Define NetworkPolicy as cycle-reset day and warning/limit values, and set/get through NetworkPolicyManager. Watch ConnectivityManager for network connection events, and apply quota rules based on matching interfaces. Policy service matches based on strong identity to support IMSI-specific policy values. Calculates remaining quota based on current stats recorded since the last reset cycle day. Tests to verify edge cases around February. Persist network and UID policies in XML, and restore on boot. Change-Id: Id40ba7d6eed6094fbd5e18e6331286c606880d80
This commit is contained in:
@@ -27,6 +27,8 @@ interface INetworkStatsService {
|
||||
/** Return historical stats for specific UID traffic that matches template. */
|
||||
NetworkStatsHistory getHistoryForUid(int uid, int networkTemplate);
|
||||
|
||||
/** Return usage summary for traffic that matches template. */
|
||||
NetworkStats getSummaryForNetwork(long start, long end, int networkTemplate, String subscriberId);
|
||||
/** Return usage summary per UID for traffic that matches template. */
|
||||
NetworkStats getSummaryForAllUid(long start, long end, int networkTemplate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user