Private DNS: Do not apply user restriction to system
Do not apply the user restriction for changing the Private DNS settings to the system caller. That will fix a bug where the DevicePolicyManager API for setting the values of Private DNS-related settings would not apply. Bug: 120416121 Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testPrivateDnsPolicy Change-Id: I26618a91224ac06e23ab86e96bc9b59d5325d3a0
This commit is contained in:
@@ -743,6 +743,9 @@ public class UserRestrictionsUtils {
|
||||
|
||||
case android.provider.Settings.Global.PRIVATE_DNS_MODE:
|
||||
case android.provider.Settings.Global.PRIVATE_DNS_SPECIFIER:
|
||||
if (callingUid == Process.SYSTEM_UID) {
|
||||
return false;
|
||||
}
|
||||
restriction = UserManager.DISALLOW_CONFIG_PRIVATE_DNS;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user