Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c0b4f39 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Clear identity when snoozing limit.

Continues to check MANAGE_NETWORK_POLICY permission.  This allows
SystemUI to invoke snoozeLimit() without CONNECTIVITY_INTERNAL.

Bug: 6653091
Change-Id: I464bf62b79f2647c6b6db151251a0036897d0cc0
parent f6f7f1d2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1407,7 +1407,13 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
    @Override
    public void snoozeLimit(NetworkTemplate template) {
        mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);

        final long token = Binder.clearCallingIdentity();
        try {
            performSnooze(template, TYPE_LIMIT);
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }

    private void performSnooze(NetworkTemplate template, int type) {