Clear identity when updating network stats.

Bug: 5945461
Change-Id: Ie51ea3f107a705c395b65684f21bf4c28c7f4d33
This commit is contained in:
Jeff Sharkey
2012-01-31 17:12:53 -08:00
parent 0d038b7949
commit 2ed12477de

View File

@@ -510,7 +510,13 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
@Override
public void forceUpdate() {
mContext.enforceCallingOrSelfPermission(READ_NETWORK_USAGE_HISTORY, TAG);
performPoll(FLAG_PERSIST_ALL);
final long token = Binder.clearCallingIdentity();
try {
performPoll(FLAG_PERSIST_ALL);
} finally {
Binder.restoreCallingIdentity(token);
}
}
/**