Clear identity when updating network stats.
Bug: 5945461 Change-Id: Ie51ea3f107a705c395b65684f21bf4c28c7f4d33
This commit is contained in:
@@ -510,7 +510,13 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
@Override
|
||||
public void forceUpdate() {
|
||||
mContext.enforceCallingOrSelfPermission(READ_NETWORK_USAGE_HISTORY, TAG);
|
||||
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
performPoll(FLAG_PERSIST_ALL);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user