summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Ma <xiaom@google.com>2020-10-14 21:23:25 +0900
committerXiao Ma <xiaom@google.com>2020-10-27 08:04:29 +0000
commit391474ee9724c04b95aae4e8ffe3cf00e46c9f2c (patch)
tree4d5826e1fcd1e170b8f03784a9ae1149a31daf19
parent42c643a2e5058bfbe0dbad3424c77be161f86daa (diff)
Add jarjar rule for IPv6ProvisioningLossQuirk.
A new stable parcelable IPv6ProvisioningLossQuirk added in network stack module, which is used to record the network quirk info which causes IPv6 provisioning loss, e.g. the router lifetime in RA is 0 and the default route will be removed from LinkProperties. Previously this change breaks CtsStrictJavaPackagesTestCases due to a jarjar rule is missed. Also rename the package name based on the revert change. Also include slight stable AIDL package and variable rename. Bug: 157534516 Test: atest CtsStrictJavaPackagesTestCases FrameworksNetTests Change-Id: Ic2f6b75beefb574f7e2fb4c157667e7734eccd05
-rw-r--r--tests/net/java/android/net/ipmemorystore/ParcelableTests.java6
-rw-r--r--tests/net/java/com/android/server/net/ipmemorystore/NetworkAttributesTest.java6
-rw-r--r--wifi/jarjar-rules.txt1
3 files changed, 7 insertions, 6 deletions
diff --git a/tests/net/java/android/net/ipmemorystore/ParcelableTests.java b/tests/net/java/android/net/ipmemorystore/ParcelableTests.java
index 1d3635709ec5..603c87519532 100644
--- a/tests/net/java/android/net/ipmemorystore/ParcelableTests.java
+++ b/tests/net/java/android/net/ipmemorystore/ParcelableTests.java
@@ -19,8 +19,8 @@ package android.net.ipmemorystore;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import android.net.quirks.IPv6ProvisioningLossQuirk;
-import android.net.quirks.IPv6ProvisioningLossQuirkParcelable;
+import android.net.networkstack.aidl.quirks.IPv6ProvisioningLossQuirk;
+import android.net.networkstack.aidl.quirks.IPv6ProvisioningLossQuirkParcelable;
import android.os.Parcel;
import android.os.Parcelable;
@@ -119,7 +119,7 @@ public class ParcelableTests {
final NetworkAttributes in = builder.build();
final NetworkAttributes out = new NetworkAttributes(parcelingRoundTrip(in.toParcelable()));
- assertEquals(out.ipv6ProvLossQuirk, in.ipv6ProvLossQuirk);
+ assertEquals(out.ipv6ProvisioningLossQuirk, in.ipv6ProvisioningLossQuirk);
}
private <T extends Parcelable> T parcelingRoundTrip(final T in) throws Exception {
diff --git a/tests/net/java/com/android/server/net/ipmemorystore/NetworkAttributesTest.java b/tests/net/java/com/android/server/net/ipmemorystore/NetworkAttributesTest.java
index cdf4b3f94fa2..ebbc0ef62548 100644
--- a/tests/net/java/com/android/server/net/ipmemorystore/NetworkAttributesTest.java
+++ b/tests/net/java/com/android/server/net/ipmemorystore/NetworkAttributesTest.java
@@ -19,7 +19,7 @@ package com.android.server.net.ipmemorystore;
import static org.junit.Assert.assertEquals;
import android.net.ipmemorystore.NetworkAttributes;
-import android.net.quirks.IPv6ProvisioningLossQuirk;
+import android.net.networkstack.aidl.quirks.IPv6ProvisioningLossQuirk;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -53,7 +53,7 @@ public class NetworkAttributesTest {
}
assertEquals(sum, NetworkAttributes.TOTAL_WEIGHT, EPSILON);
- final IPv6ProvisioningLossQuirk ipv6ProvLossQuirk =
+ final IPv6ProvisioningLossQuirk ipv6ProvisioningLossQuirk =
new IPv6ProvisioningLossQuirk(3, System.currentTimeMillis() + 7_200_000);
// Use directly the constructor with all attributes, and make sure that when compared
// to itself the score is a clean 1.0f.
@@ -64,7 +64,7 @@ public class NetworkAttributesTest {
"some hint",
Arrays.asList(Inet4Address.getByAddress(new byte[] {5, 6, 7, 8}),
Inet4Address.getByAddress(new byte[] {9, 0, 1, 2})),
- 98, ipv6ProvLossQuirk);
+ 98, ipv6ProvisioningLossQuirk);
assertEquals(1.0f, na.getNetworkGroupSamenessConfidence(na), EPSILON);
}
}
diff --git a/wifi/jarjar-rules.txt b/wifi/jarjar-rules.txt
index eef08b54f570..5c0283c680c8 100644
--- a/wifi/jarjar-rules.txt
+++ b/wifi/jarjar-rules.txt
@@ -36,6 +36,7 @@ rule android.net.ipmemorystore.IOnStatusListener* com.android.wifi.x.@0
rule android.net.ipmemorystore.NetworkAttributesParcelable* com.android.wifi.x.@0
rule android.net.ipmemorystore.SameL3NetworkResponseParcelable* com.android.wifi.x.@0
rule android.net.ipmemorystore.StatusParcelable* com.android.wifi.x.@0
+rule android.net.networkstack.aidl.quirks.IPv6ProvisioningLossQuirk* com.android.wifi.x.@0
# Net utils (includes Network Stack helper classes).
rule android.net.DhcpResults* com.android.wifi.x.@0