Merge "Fix the case where restricted mode allowed reasons are ignored"

This commit is contained in:
Sudheer Shanka
2021-11-30 18:01:59 +00:00
committed by Gerrit Code Review

View File

@@ -4759,6 +4759,8 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
? ALLOWED_REASON_POWER_SAVE_ALLOWLIST : 0);
newAllowedReasons |= (isWhitelistedFromPowerSaveExceptIdleUL(uid)
? ALLOWED_REASON_POWER_SAVE_EXCEPT_IDLE_ALLOWLIST : 0);
newAllowedReasons |= (uidBlockedState.allowedReasons
& ALLOWED_REASON_RESTRICTED_MODE_PERMISSIONS);
uidBlockedState.blockedReasons = (uidBlockedState.blockedReasons
& BLOCKED_METERED_REASON_MASK) | newBlockedReasons;