commit | 6266342327611f70bea43730e2fcaf9e7536a98b | [log] [tgz] |
---|---|---|
author | Suprabh Shukla <suprabh@google.com> | Thu Feb 15 22:30:39 2024 +0000 |
committer | Android Build Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Thu Feb 15 22:30:39 2024 +0000 |
tree | 512c6c0362749272a813e1e5479de62eacc47184 | |
parent | 4f956270f7b72ec7c792ddda65dd90248ec4b7e5 [diff] |
Temporarily skip the tests for background restrictions Test: atest CtsHostsideNetworkTests Bug: 304347838 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4cef70d592e91c2ccd3419f52bf779e29fcb4a79) Merged-In: I88ffa390a890a09d95109518329ba6abcb162bc1 Change-Id: I88ffa390a890a09d95109518329ba6abcb162bc1
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java index 2ca8832..1241e18 100644 --- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java +++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
@@ -160,6 +160,10 @@ private static final long BROADCAST_TIMEOUT_MS = 5_000; + // Should be kept in sync with the constant in NetworkPolicyManagerService. + // TODO: b/322115994 - remove once the feature is in staging. + private static final boolean ALWAYS_RESTRICT_BACKGROUND_NETWORK = false; + protected Context mContext; protected Instrumentation mInstrumentation; protected ConnectivityManager mCm; @@ -229,9 +233,8 @@ } final String output = executeShellCommand("device_config get backstage_power" + " com.android.server.net.network_blocked_for_top_sleeping_and_above"); - return Boolean.parseBoolean(output); + return Boolean.parseBoolean(output) && ALWAYS_RESTRICT_BACKGROUND_NETWORK; } - protected int getUid(String packageName) throws Exception { return mContext.getPackageManager().getPackageUid(packageName, 0); }