Loading wifi/java/src/android/net/wifi/sharedconnectivity/app/HotspotNetwork.java +1 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ public final class HotspotNetwork implements Parcelable { } } private static void validate(long deviceId, int networkType, String networkName) { private static void validate(long deviceId, @NetworkType int networkType, String networkName) { if (deviceId < 0) { throw new IllegalArgumentException("DeviceId must be set"); } Loading wifi/java/src/android/net/wifi/sharedconnectivity/app/HotspotNetworkConnectionStatus.java +17 −2 Original line number Diff line number Diff line Loading @@ -163,9 +163,24 @@ public final class HotspotNetworkConnectionStatus implements Parcelable { } } private static void validate(@ConnectionStatus int status) { if (status != CONNECTION_STATUS_UNKNOWN && status != CONNECTION_STATUS_ENABLING_HOTSPOT && status != CONNECTION_STATUS_UNKNOWN_ERROR && status != CONNECTION_STATUS_PROVISIONING_FAILED && status != CONNECTION_STATUS_TETHERING_TIMEOUT && status != CONNECTION_STATUS_TETHERING_UNSUPPORTED && status != CONNECTION_STATUS_NO_CELL_DATA && status != CONNECTION_STATUS_ENABLING_HOTSPOT_FAILED && status != CONNECTION_STATUS_ENABLING_HOTSPOT_TIMEOUT && status != CONNECTION_STATUS_CONNECT_TO_HOTSPOT_FAILED) { throw new IllegalArgumentException("Illegal connection status"); } } private HotspotNetworkConnectionStatus(@ConnectionStatus int status, HotspotNetwork hotspotNetwork, Bundle extras) { HotspotNetwork hotspotNetwork, Bundle extras) { validate(status); mStatus = status; mHotspotNetwork = hotspotNetwork; mExtras = extras; Loading wifi/java/src/android/net/wifi/sharedconnectivity/app/KnownNetwork.java +12 −6 Original line number Diff line number Diff line Loading @@ -64,20 +64,25 @@ public final class KnownNetwork implements Parcelable { NETWORK_SOURCE_NEARBY_SELF, NETWORK_SOURCE_CLOUD_SELF }) public @interface NetworkSource {} public @interface NetworkSource { } @NetworkSource private final int mNetworkSource; @NetworkSource private final int mNetworkSource; private final String mSsid; @SecurityType private final ArraySet<Integer> mSecurityTypes; @SecurityType private final ArraySet<Integer> mSecurityTypes; private final NetworkProviderInfo mNetworkProviderInfo; /** * Builder class for {@link KnownNetwork}. */ public static final class Builder { @NetworkSource private int mNetworkSource = -1; @NetworkSource private int mNetworkSource = -1; private String mSsid; @SecurityType private final ArraySet<Integer> mSecurityTypes = new ArraySet<>(); @SecurityType private final ArraySet<Integer> mSecurityTypes = new ArraySet<>(); private NetworkProviderInfo mNetworkProviderInfo; /** Loading Loading @@ -144,7 +149,8 @@ public final class KnownNetwork implements Parcelable { } } private static void validate(int networkSource, String ssid, Set<Integer> securityTypes, private static void validate(@NetworkSource int networkSource, String ssid, @SecurityType Set<Integer> securityTypes, NetworkProviderInfo networkProviderInfo) { if (networkSource != NETWORK_SOURCE_UNKNOWN && networkSource != NETWORK_SOURCE_CLOUD_SELF Loading wifi/java/src/android/net/wifi/sharedconnectivity/app/KnownNetworkConnectionStatus.java +8 −0 Original line number Diff line number Diff line Loading @@ -120,8 +120,16 @@ public final class KnownNetworkConnectionStatus implements Parcelable { } } private static void validate(@ConnectionStatus int status) { if (status != CONNECTION_STATUS_UNKNOWN && status != CONNECTION_STATUS_SAVED && status != CONNECTION_STATUS_SAVE_FAILED) { throw new IllegalArgumentException("Illegal connection status"); } } private KnownNetworkConnectionStatus(@ConnectionStatus int status, KnownNetwork knownNetwork, Bundle extras) { validate(status); mStatus = status; mKnownNetwork = knownNetwork; mExtras = extras; Loading wifi/java/src/android/net/wifi/sharedconnectivity/app/NetworkProviderInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public final class NetworkProviderInfo implements Parcelable { } } private static void validate(int deviceType, String deviceName, String modelName, private static void validate(@DeviceType int deviceType, String deviceName, String modelName, int batteryPercentage, int connectionStrength) { if (deviceType != DEVICE_TYPE_UNKNOWN && deviceType != DEVICE_TYPE_PHONE && deviceType != DEVICE_TYPE_TABLET && deviceType != DEVICE_TYPE_LAPTOP Loading Loading
wifi/java/src/android/net/wifi/sharedconnectivity/app/HotspotNetwork.java +1 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ public final class HotspotNetwork implements Parcelable { } } private static void validate(long deviceId, int networkType, String networkName) { private static void validate(long deviceId, @NetworkType int networkType, String networkName) { if (deviceId < 0) { throw new IllegalArgumentException("DeviceId must be set"); } Loading
wifi/java/src/android/net/wifi/sharedconnectivity/app/HotspotNetworkConnectionStatus.java +17 −2 Original line number Diff line number Diff line Loading @@ -163,9 +163,24 @@ public final class HotspotNetworkConnectionStatus implements Parcelable { } } private static void validate(@ConnectionStatus int status) { if (status != CONNECTION_STATUS_UNKNOWN && status != CONNECTION_STATUS_ENABLING_HOTSPOT && status != CONNECTION_STATUS_UNKNOWN_ERROR && status != CONNECTION_STATUS_PROVISIONING_FAILED && status != CONNECTION_STATUS_TETHERING_TIMEOUT && status != CONNECTION_STATUS_TETHERING_UNSUPPORTED && status != CONNECTION_STATUS_NO_CELL_DATA && status != CONNECTION_STATUS_ENABLING_HOTSPOT_FAILED && status != CONNECTION_STATUS_ENABLING_HOTSPOT_TIMEOUT && status != CONNECTION_STATUS_CONNECT_TO_HOTSPOT_FAILED) { throw new IllegalArgumentException("Illegal connection status"); } } private HotspotNetworkConnectionStatus(@ConnectionStatus int status, HotspotNetwork hotspotNetwork, Bundle extras) { HotspotNetwork hotspotNetwork, Bundle extras) { validate(status); mStatus = status; mHotspotNetwork = hotspotNetwork; mExtras = extras; Loading
wifi/java/src/android/net/wifi/sharedconnectivity/app/KnownNetwork.java +12 −6 Original line number Diff line number Diff line Loading @@ -64,20 +64,25 @@ public final class KnownNetwork implements Parcelable { NETWORK_SOURCE_NEARBY_SELF, NETWORK_SOURCE_CLOUD_SELF }) public @interface NetworkSource {} public @interface NetworkSource { } @NetworkSource private final int mNetworkSource; @NetworkSource private final int mNetworkSource; private final String mSsid; @SecurityType private final ArraySet<Integer> mSecurityTypes; @SecurityType private final ArraySet<Integer> mSecurityTypes; private final NetworkProviderInfo mNetworkProviderInfo; /** * Builder class for {@link KnownNetwork}. */ public static final class Builder { @NetworkSource private int mNetworkSource = -1; @NetworkSource private int mNetworkSource = -1; private String mSsid; @SecurityType private final ArraySet<Integer> mSecurityTypes = new ArraySet<>(); @SecurityType private final ArraySet<Integer> mSecurityTypes = new ArraySet<>(); private NetworkProviderInfo mNetworkProviderInfo; /** Loading Loading @@ -144,7 +149,8 @@ public final class KnownNetwork implements Parcelable { } } private static void validate(int networkSource, String ssid, Set<Integer> securityTypes, private static void validate(@NetworkSource int networkSource, String ssid, @SecurityType Set<Integer> securityTypes, NetworkProviderInfo networkProviderInfo) { if (networkSource != NETWORK_SOURCE_UNKNOWN && networkSource != NETWORK_SOURCE_CLOUD_SELF Loading
wifi/java/src/android/net/wifi/sharedconnectivity/app/KnownNetworkConnectionStatus.java +8 −0 Original line number Diff line number Diff line Loading @@ -120,8 +120,16 @@ public final class KnownNetworkConnectionStatus implements Parcelable { } } private static void validate(@ConnectionStatus int status) { if (status != CONNECTION_STATUS_UNKNOWN && status != CONNECTION_STATUS_SAVED && status != CONNECTION_STATUS_SAVE_FAILED) { throw new IllegalArgumentException("Illegal connection status"); } } private KnownNetworkConnectionStatus(@ConnectionStatus int status, KnownNetwork knownNetwork, Bundle extras) { validate(status); mStatus = status; mKnownNetwork = knownNetwork; mExtras = extras; Loading
wifi/java/src/android/net/wifi/sharedconnectivity/app/NetworkProviderInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public final class NetworkProviderInfo implements Parcelable { } } private static void validate(int deviceType, String deviceName, String modelName, private static void validate(@DeviceType int deviceType, String deviceName, String modelName, int batteryPercentage, int connectionStrength) { if (deviceType != DEVICE_TYPE_UNKNOWN && deviceType != DEVICE_TYPE_PHONE && deviceType != DEVICE_TYPE_TABLET && deviceType != DEVICE_TYPE_LAPTOP Loading