Skip to content

Commit 42a3979

Browse files
author
Alex Johnston
committed
Call DPM isPreferentialNetworkServiceEnabled
* API method isPreferentialNetworkServiceEnabled exists in DevicePolicyManager instead of UserManager Bug: 186451999 Test: manual testing with TestDPC Change-Id: Ib677f43c6552317d39c25b888b7a68adc7cd7270
1 parent 7d94be9 commit 42a3979

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/java/com/afwsamples/testdpc/DevicePolicyManagerGatewayImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ public boolean isPreferentialNetworkServiceEnabled() {
519519
String method = "isPreferentialNetworkServiceEnabled";
520520
try {
521521
// TODO(b/179160578): use proper method when available on SDK
522-
return (Boolean) ReflectionUtil.invoke(mUserManager, method);
522+
return (Boolean) ReflectionUtil.invoke(mDevicePolicyManager, method);
523523
} catch (ReflectionIsTemporaryException e) {
524524
Log.wtf(TAG, "Error calling " + method + "()", e);
525525
return false;

0 commit comments

Comments
 (0)