Loading core/java/android/net/MatchAllNetworkSpecifier.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -43,7 +43,8 @@ public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements } } /** @hide */ /** @hide */ public boolean satisfiedBy(NetworkSpecifier other) { @Override public boolean canBeSatisfiedBy(NetworkSpecifier other) { /* /* * The method is called by a NetworkRequest to see if it is satisfied by a proposed * The method is called by a NetworkRequest to see if it is satisfied by a proposed * network (e.g. as offered by a network factory). Since MatchAllNetweorkSpecifier must * network (e.g. as offered by a network factory). Since MatchAllNetweorkSpecifier must Loading tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -39,12 +39,12 @@ class MatchAllNetworkSpecifierTest { } } @Test(expected = IllegalStateException::class) @Test(expected = IllegalStateException::class) fun testSatisfiedBy() { fun testCanBeSatisfiedBy() { val specifier = MatchAllNetworkSpecifier() val specifier = MatchAllNetworkSpecifier() val discoverySession = Mockito.mock(DiscoverySession::class.java) val discoverySession = Mockito.mock(DiscoverySession::class.java) val peerHandle = Mockito.mock(PeerHandle::class.java) val peerHandle = Mockito.mock(PeerHandle::class.java) val wifiAwareNetworkSpecifier = WifiAwareNetworkSpecifier.Builder(discoverySession, val wifiAwareNetworkSpecifier = WifiAwareNetworkSpecifier.Builder(discoverySession, peerHandle).build() peerHandle).build() specifier.satisfiedBy(wifiAwareNetworkSpecifier) specifier.canBeSatisfiedBy(wifiAwareNetworkSpecifier) } } } } Loading
core/java/android/net/MatchAllNetworkSpecifier.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -43,7 +43,8 @@ public final class MatchAllNetworkSpecifier extends NetworkSpecifier implements } } /** @hide */ /** @hide */ public boolean satisfiedBy(NetworkSpecifier other) { @Override public boolean canBeSatisfiedBy(NetworkSpecifier other) { /* /* * The method is called by a NetworkRequest to see if it is satisfied by a proposed * The method is called by a NetworkRequest to see if it is satisfied by a proposed * network (e.g. as offered by a network factory). Since MatchAllNetweorkSpecifier must * network (e.g. as offered by a network factory). Since MatchAllNetweorkSpecifier must Loading
tests/net/common/java/android/net/MatchAllNetworkSpecifierTest.kt +2 −2 Original line number Original line Diff line number Diff line Loading @@ -39,12 +39,12 @@ class MatchAllNetworkSpecifierTest { } } @Test(expected = IllegalStateException::class) @Test(expected = IllegalStateException::class) fun testSatisfiedBy() { fun testCanBeSatisfiedBy() { val specifier = MatchAllNetworkSpecifier() val specifier = MatchAllNetworkSpecifier() val discoverySession = Mockito.mock(DiscoverySession::class.java) val discoverySession = Mockito.mock(DiscoverySession::class.java) val peerHandle = Mockito.mock(PeerHandle::class.java) val peerHandle = Mockito.mock(PeerHandle::class.java) val wifiAwareNetworkSpecifier = WifiAwareNetworkSpecifier.Builder(discoverySession, val wifiAwareNetworkSpecifier = WifiAwareNetworkSpecifier.Builder(discoverySession, peerHandle).build() peerHandle).build() specifier.satisfiedBy(wifiAwareNetworkSpecifier) specifier.canBeSatisfiedBy(wifiAwareNetworkSpecifier) } } } }