Skip to content

Commit a08f9ae

Browse files
jscott1989pfmaggi
authored andcommitted
No public description
PiperOrigin-RevId: 576036910
1 parent 3a119c3 commit a08f9ae

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bazel-android-testdpc
2+
bazel-bin
3+
bazel-out
4+
bazel-testlogs
5+
**/*.iml
6+
.idea

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See the [documentation](https://developer.android.com/work/index.html) to learn
88
Getting Started
99
---------------
1010

11-
This sample uses the Bazel build system. To build this project, use the "bazel build --noincremental_dexing" command.
11+
This sample uses the Bazel build system. To build this project, use the "bazel build testdpc" command.
1212

1313
This app can also be found [on the Play store](https://play.google.com/store/apps/details?id=com.afwsamples.testdpc).
1414

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import java.util.Set;
4949
import java.util.function.Consumer;
5050
import java.util.stream.Collectors;
51+
import static com.afwsamples.testdpc.common.Util.isAtLeastT;
5152

5253
public final class DevicePolicyManagerGatewayImpl implements DevicePolicyManagerGateway {
5354

@@ -651,7 +652,9 @@ public void setPreferentialNetworkServiceEnabled(
651652

652653
@Override
653654
public boolean isPreferentialNetworkServiceEnabled() {
654-
Util.requireAndroidS();
655+
if (!isAtLeastT()) {
656+
return false;
657+
}
655658

656659
return mDevicePolicyManager.isPreferentialNetworkServiceEnabled();
657660
}

0 commit comments

Comments
 (0)