Merge "Clear identity when snoozing limit." into jb-dev

This commit is contained in:
Jeff Sharkey
2012-06-13 12:06:10 -07:00
committed by Android (Google) Code Review

View File

@@ -1407,7 +1407,13 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
@Override
public void snoozeLimit(NetworkTemplate template) {
mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
performSnooze(template, TYPE_LIMIT);
final long token = Binder.clearCallingIdentity();
try {
performSnooze(template, TYPE_LIMIT);
} finally {
Binder.restoreCallingIdentity(token);
}
}
private void performSnooze(NetworkTemplate template, int type) {