Clear identity when checking if bandwidth enabled.

Change-Id: I0f10f86dc14483e29609057c671454b322da4826
This commit is contained in:
Jeff Sharkey
2012-04-23 14:39:19 -07:00
parent 32c773b16a
commit f6d43ea959

View File

@@ -1050,11 +1050,14 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
}
private boolean isBandwidthControlEnabled() {
final long token = Binder.clearCallingIdentity();
try {
return mNetworkManager.isBandwidthControlEnabled();
} catch (RemoteException e) {
// ignored; service lives in system_server
return false;
} finally {
Binder.restoreCallingIdentity(token);
}
}