summaryrefslogtreecommitdiff
path: root/services/devicepolicy
diff options
context:
space:
mode:
authorlucaslin <lucaslin@google.com>2021-03-16 17:11:14 +0800
committerLucas Lin <lucaslin@google.com>2021-03-16 09:26:57 +0000
commit7384af3e6b564afc9d775c8dce195b87bf865368 (patch)
tree180490fd0c9fa65f37870440c98389f43eb7df83 /services/devicepolicy
parent179ecda65f78c9edb5b314a53c3312beeef68648 (diff)
Change the parameter type from ContentResolver to Context
Context is more useful than ContentResolver, it can provide more information if we want to change the behavior in the future. Bug: 172183305 Test: atest FrameworksNetTests Change-Id: I5702c7d74b862a76558b94f1abe2c6df9eb7f097 Merged-In: I5702c7d74b862a76558b94f1abe2c6df9eb7f097
Diffstat (limited to 'services/devicepolicy')
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 374abd6a6f85..736a6f68725e 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -15621,8 +15621,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
Objects.requireNonNull(who, "ComponentName is null");
enforceDeviceOwner(who);
- final String currentMode =
- ConnectivityManager.getPrivateDnsMode(mContext.getContentResolver());
+ final String currentMode = ConnectivityManager.getPrivateDnsMode(mContext);
switch (currentMode) {
case ConnectivityManager.PRIVATE_DNS_MODE_OFF:
return PRIVATE_DNS_MODE_OFF;