Loading wifi/java/android/net/wifi/WifiNetworkSpecifier.java +0 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.internal.util.Preconditions.checkNotNull; import android.annotation.NonNull; import android.annotation.Nullable; import android.net.MacAddress; import android.net.MatchAllNetworkSpecifier; import android.net.NetworkRequest; import android.net.NetworkSpecifier; import android.os.Parcel; Loading Loading @@ -553,13 +552,6 @@ public final class WifiNetworkSpecifier extends NetworkSpecifier implements Parc /** @hide */ @Override public boolean canBeSatisfiedBy(NetworkSpecifier other) { if (this == other) { return true; } // Any generic requests should be satisifed by a specific wifi network. if (other == null || other instanceof MatchAllNetworkSpecifier) { return true; } if (other instanceof WifiNetworkAgentSpecifier) { return ((WifiNetworkAgentSpecifier) other).satisfiesNetworkSpecifier(this); } Loading wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -382,11 +382,11 @@ public class WifiNetworkSpecifierTest { /** * Validate NetworkSpecifier matching. * a) Create a network specifier for WPA_PSK network * b) Ensure that the specifier matches {@code null} and {@link MatchAllNetworkSpecifier} * b) Ensure that the specifier does not match {@code null} and {@link MatchAllNetworkSpecifier} * specifiers. */ @Test public void testWifiNetworkSpecifierSatisfiesNullAndAllMatch() { public void testWifiNetworkSpecifierDoesNotSatisfyNullAndAllMatch() { WifiConfiguration wifiConfiguration = new WifiConfiguration(); wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; Loading @@ -396,8 +396,8 @@ public class WifiNetworkSpecifierTest { MacAddress.fromString(TEST_BSSID_OUI_MASK)), wifiConfiguration); assertTrue(specifier.canBeSatisfiedBy(null)); assertTrue(specifier.canBeSatisfiedBy(new MatchAllNetworkSpecifier())); assertFalse(specifier.canBeSatisfiedBy(null)); assertFalse(specifier.canBeSatisfiedBy(new MatchAllNetworkSpecifier())); } /** Loading Loading
wifi/java/android/net/wifi/WifiNetworkSpecifier.java +0 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.internal.util.Preconditions.checkNotNull; import android.annotation.NonNull; import android.annotation.Nullable; import android.net.MacAddress; import android.net.MatchAllNetworkSpecifier; import android.net.NetworkRequest; import android.net.NetworkSpecifier; import android.os.Parcel; Loading Loading @@ -553,13 +552,6 @@ public final class WifiNetworkSpecifier extends NetworkSpecifier implements Parc /** @hide */ @Override public boolean canBeSatisfiedBy(NetworkSpecifier other) { if (this == other) { return true; } // Any generic requests should be satisifed by a specific wifi network. if (other == null || other instanceof MatchAllNetworkSpecifier) { return true; } if (other instanceof WifiNetworkAgentSpecifier) { return ((WifiNetworkAgentSpecifier) other).satisfiesNetworkSpecifier(this); } Loading
wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -382,11 +382,11 @@ public class WifiNetworkSpecifierTest { /** * Validate NetworkSpecifier matching. * a) Create a network specifier for WPA_PSK network * b) Ensure that the specifier matches {@code null} and {@link MatchAllNetworkSpecifier} * b) Ensure that the specifier does not match {@code null} and {@link MatchAllNetworkSpecifier} * specifiers. */ @Test public void testWifiNetworkSpecifierSatisfiesNullAndAllMatch() { public void testWifiNetworkSpecifierDoesNotSatisfyNullAndAllMatch() { WifiConfiguration wifiConfiguration = new WifiConfiguration(); wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; Loading @@ -396,8 +396,8 @@ public class WifiNetworkSpecifierTest { MacAddress.fromString(TEST_BSSID_OUI_MASK)), wifiConfiguration); assertTrue(specifier.canBeSatisfiedBy(null)); assertTrue(specifier.canBeSatisfiedBy(new MatchAllNetworkSpecifier())); assertFalse(specifier.canBeSatisfiedBy(null)); assertFalse(specifier.canBeSatisfiedBy(new MatchAllNetworkSpecifier())); } /** Loading