API to adjust network stats. DO NOT MERGE.
Enables system apps to correctly account network usage performed on behalf of another application. Bug: 6695246 Change-Id: I39e243afd57936b6b30157a6ca511a17b6c55c39
This commit is contained in:
@@ -695,6 +695,14 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
mGlobalAlertBytes = mSettings.getGlobalAlertBytes(mPersistThreshold);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustNetworkStats(int uid, int tag, long rxBytes, long rxPackets, long txBytes,
|
||||
long txPackets, long operationCount) {
|
||||
mContext.enforceCallingOrSelfPermission(MODIFY_NETWORK_ACCOUNTING, TAG);
|
||||
|
||||
// TODO: store adjusted network stats in separate data structure
|
||||
}
|
||||
|
||||
/**
|
||||
* Receiver that watches for {@link IConnectivityManager} to claim network
|
||||
* interfaces. Used to associate {@link TelephonyManager#getSubscriberId()}
|
||||
|
||||
Reference in New Issue
Block a user