diff options
author | Remi NGUYEN VAN <reminv@google.com> | 2019-03-14 08:09:58 +0900 |
---|---|---|
committer | Remi NGUYEN VAN <reminv@google.com> | 2019-03-16 03:50:58 +0900 |
commit | 15eaa7ac9f20a51008b9faa038e1fff1a8c63d09 (patch) | |
tree | b4c6632012b13a9599d9b3503b62c6289c5cc629 /tests/src/android/net/ip/IpClientTest.java | |
parent | ff5b1c04c353876d516842ad5939db58785b4304 (diff) |
Remove aidl wrappers for framework parcelables
The new @JavaOnlyStableParcelable annotation allows using the framework
parcelables directly, which removes a lot of boilerplate.
Includes new copy constructors for IpPrefix and LinkAddress so they can
be copied easily as-is into parcelables.
Test: atest FrameworksNetTests
Test: booted, WiFi works
Bug: 126477266
Change-Id: Icac8afe498d0b5ebf9a0d0b9eceb14d64a29b381
Diffstat (limited to 'tests/src/android/net/ip/IpClientTest.java')
-rw-r--r-- | tests/src/android/net/ip/IpClientTest.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/src/android/net/ip/IpClientTest.java b/tests/src/android/net/ip/IpClientTest.java index bd488ea..4536c47 100644 --- a/tests/src/android/net/ip/IpClientTest.java +++ b/tests/src/android/net/ip/IpClientTest.java @@ -16,13 +16,10 @@ package android.net.ip; -import static android.net.shared.LinkPropertiesParcelableUtil.fromStableParcelable; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.any; import static org.mockito.Mockito.anyString; import static org.mockito.Mockito.eq; @@ -207,8 +204,7 @@ public class IpClientTest { verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceSetEnableIPv6(iface, false); verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceClearAddrs(iface); verify(mCb, timeout(TEST_TIMEOUT_MS).times(1)) - .onLinkPropertiesChange(argThat( - lp -> fromStableParcelable(lp).equals(makeEmptyLinkProperties(iface)))); + .onLinkPropertiesChange(makeEmptyLinkProperties(iface)); } @Test @@ -253,15 +249,13 @@ public class IpClientTest { mObserver.onInterfaceAddressUpdated(new LinkAddress(addresses[lastAddr]), iface); LinkProperties want = linkproperties(links(addresses), routes(prefixes)); want.setInterfaceName(iface); - verify(mCb, timeout(TEST_TIMEOUT_MS).times(1)).onProvisioningSuccess(argThat( - lp -> fromStableParcelable(lp).equals(want))); + verify(mCb, timeout(TEST_TIMEOUT_MS).times(1)).onProvisioningSuccess(want); ipc.shutdown(); verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceSetEnableIPv6(iface, false); verify(mNetd, timeout(TEST_TIMEOUT_MS).times(1)).interfaceClearAddrs(iface); verify(mCb, timeout(TEST_TIMEOUT_MS).times(1)) - .onLinkPropertiesChange(argThat( - lp -> fromStableParcelable(lp).equals(makeEmptyLinkProperties(iface)))); + .onLinkPropertiesChange(makeEmptyLinkProperties(iface)); } @Test |