Better network stats parsing, integer tags, async.
Change NMS parsing to handle extended /proc/ stats formats by pairing values with header keys. Move TrafficStats to integer tags to match kernel internals, and offer well-known tags for system services. Async policy event dispatch from NPMS, and update tests to block for event dispatch. Narrow app policy to exclude apps signed with system key, which are usually critical. Bug: 4948913, 4903489, 4585280 Change-Id: Idb357227ccaa617906411f309371cea18d7bc519
This commit is contained in:
@@ -124,8 +124,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
private PendingIntent mPollIntent;
|
||||
|
||||
// TODO: listen for kernel push events through netd instead of polling
|
||||
// TODO: watch for UID uninstall, and transfer stats into single bucket
|
||||
|
||||
// TODO: trim empty history objects entirely
|
||||
|
||||
private static final long KB_IN_BYTES = 1024;
|
||||
@@ -506,8 +504,11 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
try {
|
||||
networkSnapshot = mNetworkManager.getNetworkStatsSummary();
|
||||
uidSnapshot = detailedPoll ? mNetworkManager.getNetworkStatsDetail() : null;
|
||||
} catch (IllegalStateException e) {
|
||||
Slog.w(TAG, "problem reading network stats: " + e);
|
||||
return;
|
||||
} catch (RemoteException e) {
|
||||
Slog.w(TAG, "problem reading network stats");
|
||||
Slog.w(TAG, "problem reading network stats: " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user