summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2022-01-31 21:55:43 +0900
committerRemi NGUYEN VAN <reminv@google.com>2022-01-31 21:55:43 +0900
commit40725a7640bd637bf2535ba710672fff6fa59274 (patch)
tree748a97b79c0d576e5c6b338a42bab89c08d14b67
parent93c47b480e5983902f7e2ea0d38c3fd9e653a663 (diff)
downloadnet-40725a7640bd637bf2535ba710672fff6fa59274.tar.gz
Mark VisibleForTesting members as public
Package-private members are not visible across jars; with the latest refactoring of build and jarjar rules for connectivity, tests fail as the utils are picked up from the on-device module rather than the test package, and such members could not be found. Bug: 204830222 Test: atest ConnectivityCoverageTests Change-Id: Ia62b01e2e3123a2d8a432c061e3c576c86356df5
-rw-r--r--common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java4
-rw-r--r--common/framework/com/android/net/module/util/NetworkStatsUtils.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java b/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
index 71a0c966..26c24f8d 100644
--- a/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
+++ b/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
@@ -85,7 +85,7 @@ public final class NetworkCapabilitiesUtils {
* and {@code FORCE_RESTRICTED_CAPABILITIES}.
*/
@VisibleForTesting
- static final long RESTRICTED_CAPABILITIES = packBitList(
+ public static final long RESTRICTED_CAPABILITIES = packBitList(
NET_CAPABILITY_BIP,
NET_CAPABILITY_CBS,
NET_CAPABILITY_DUN,
@@ -115,7 +115,7 @@ public final class NetworkCapabilitiesUtils {
* See {@code NetworkCapabilities#maybeMarkCapabilitiesRestricted}.
*/
@VisibleForTesting
- static final long UNRESTRICTED_CAPABILITIES = packBitList(
+ public static final long UNRESTRICTED_CAPABILITIES = packBitList(
NET_CAPABILITY_INTERNET,
NET_CAPABILITY_MMS,
NET_CAPABILITY_SUPL,
diff --git a/common/framework/com/android/net/module/util/NetworkStatsUtils.java b/common/framework/com/android/net/module/util/NetworkStatsUtils.java
index c4d415ef..41a9428a 100644
--- a/common/framework/com/android/net/module/util/NetworkStatsUtils.java
+++ b/common/framework/com/android/net/module/util/NetworkStatsUtils.java
@@ -116,7 +116,7 @@ public class NetworkStatsUtils {
}
@VisibleForTesting
- static android.net.NetworkStats.Entry fromBucket(NetworkStats.Bucket bucket) {
+ public static android.net.NetworkStats.Entry fromBucket(NetworkStats.Bucket bucket) {
return new android.net.NetworkStats.Entry(
null /* IFACE_ALL */, bucket.getUid(), convertBucketState(bucket.getState()),
convertBucketTag(bucket.getTag()), convertBucketMetered(bucket.getMetered()),