Fix the case where restricted mode allowed reasons are ignored
Restricted mode allowed reasons are not considered in power and data usage restriction rule updates. This could result in sending the wrong network state to apps. Bug: 202213533 Test: presubmit tests Change-Id: I5e616fd1e9a916ad9a367b4391c85c1febbf1f6b Merged-In: I5e616fd1e9a916ad9a367b4391c85c1febbf1f6b
This commit is contained in:
committed by
Sudheer Shanka
parent
bda966d4d0
commit
8ec56b2f84
@@ -4899,6 +4899,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);
|
||||
|
||||
if (LOGV) {
|
||||
Log.v(TAG, "updateRulesForPowerRestrictionsUL(" + uid + ")"
|
||||
|
||||
Reference in New Issue
Block a user