Merge "Expose WifiConfiguration @hide APIs as @SystemApi"
This commit is contained in:
@@ -5140,19 +5140,46 @@ package android.net.wifi {
|
||||
}
|
||||
|
||||
@Deprecated public class WifiConfiguration implements android.os.Parcelable {
|
||||
method @Deprecated public int getAuthType();
|
||||
method @Deprecated @NonNull public android.net.IpConfiguration.IpAssignment getIpAssignment();
|
||||
method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus getNetworkSelectionStatus();
|
||||
method @Deprecated @NonNull public String getPrintableSsid();
|
||||
method @Deprecated @NonNull public android.net.IpConfiguration.ProxySettings getProxySettings();
|
||||
method @Deprecated @Nullable public android.net.StaticIpConfiguration getStaticIpConfiguration();
|
||||
method @Deprecated public boolean hasNoInternetAccess();
|
||||
method @Deprecated public boolean isEphemeral();
|
||||
method @Deprecated public static boolean isMetered(@Nullable android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiInfo);
|
||||
method @Deprecated public boolean isNoInternetAccessExpected();
|
||||
method @Deprecated public void setIpConfiguration(@Nullable android.net.IpConfiguration);
|
||||
method @Deprecated public void setProxy(@NonNull android.net.IpConfiguration.ProxySettings, @NonNull android.net.ProxyInfo);
|
||||
field @Deprecated public static final int AP_BAND_2GHZ = 0; // 0x0
|
||||
field @Deprecated public static final int AP_BAND_5GHZ = 1; // 0x1
|
||||
field @Deprecated public static final int AP_BAND_ANY = -1; // 0xffffffff
|
||||
field @Deprecated public static final int INVALID_NETWORK_ID = -1; // 0xffffffff
|
||||
field @Deprecated public static final int METERED_OVERRIDE_METERED = 1; // 0x1
|
||||
field @Deprecated public static final int METERED_OVERRIDE_NONE = 0; // 0x0
|
||||
field @Deprecated public static final int METERED_OVERRIDE_NOT_METERED = 2; // 0x2
|
||||
field @Deprecated public static final int RANDOMIZATION_NONE = 0; // 0x0
|
||||
field @Deprecated public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1
|
||||
field @Deprecated public boolean allowAutojoin;
|
||||
field @Deprecated public int apBand;
|
||||
field @Deprecated public int carrierId;
|
||||
field @Deprecated public String creatorName;
|
||||
field @Deprecated public int creatorUid;
|
||||
field @Deprecated public boolean fromWifiNetworkSpecifier;
|
||||
field @Deprecated public boolean fromWifiNetworkSuggestion;
|
||||
field @Deprecated public String lastUpdateName;
|
||||
field @Deprecated public int lastUpdateUid;
|
||||
field @Deprecated public int macRandomizationSetting;
|
||||
field @Deprecated public boolean meteredHint;
|
||||
field @Deprecated public int meteredOverride;
|
||||
field @Deprecated public int numAssociation;
|
||||
field @Deprecated public int numScorerOverride;
|
||||
field @Deprecated public int numScorerOverrideAndSwitchedNetwork;
|
||||
field @Deprecated @NonNull public final android.net.wifi.WifiConfiguration.RecentFailure recentFailure;
|
||||
field @Deprecated public boolean requirePMF;
|
||||
field @Deprecated @Nullable public String saePasswordId;
|
||||
field @Deprecated public boolean shared;
|
||||
field @Deprecated public boolean useExternalScores;
|
||||
}
|
||||
|
||||
@@ -5160,6 +5187,49 @@ package android.net.wifi {
|
||||
field @Deprecated public static final int WPA2_PSK = 4; // 0x4
|
||||
}
|
||||
|
||||
@Deprecated public static class WifiConfiguration.NetworkSelectionStatus {
|
||||
method @Deprecated public int getDisableReasonCounter(int);
|
||||
method @Deprecated public long getDisableTime();
|
||||
method @Deprecated public boolean getHasEverConnected();
|
||||
method @Deprecated @Nullable public static String getNetworkDisableReasonString(int);
|
||||
method @Deprecated public int getNetworkSelectionDisableReason();
|
||||
method @Deprecated @NonNull public String getNetworkStatusString();
|
||||
method @Deprecated public boolean isNetworkEnabled();
|
||||
method @Deprecated public boolean isNetworkPermanentlyDisabled();
|
||||
field @Deprecated public static final int DISABLED_ASSOCIATION_REJECTION = 1; // 0x1
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_FAILURE = 2; // 0x2
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_CREDENTIALS = 5; // 0x5
|
||||
field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_SUBSCRIPTION = 9; // 0x9
|
||||
field @Deprecated public static final int DISABLED_BY_WIFI_MANAGER = 7; // 0x7
|
||||
field @Deprecated public static final int DISABLED_BY_WRONG_PASSWORD = 8; // 0x8
|
||||
field @Deprecated public static final int DISABLED_DHCP_FAILURE = 3; // 0x3
|
||||
field @Deprecated public static final int DISABLED_NO_INTERNET_PERMANENT = 6; // 0x6
|
||||
field @Deprecated public static final int DISABLED_NO_INTERNET_TEMPORARY = 4; // 0x4
|
||||
field @Deprecated public static final int NETWORK_SELECTION_DISABLED_MAX = 10; // 0xa
|
||||
field @Deprecated public static final int NETWORK_SELECTION_ENABLE = 0; // 0x0
|
||||
}
|
||||
|
||||
@Deprecated public static class WifiConfiguration.RecentFailure {
|
||||
method @Deprecated public int getAssociationStatus();
|
||||
field @Deprecated public static final int NONE = 0; // 0x0
|
||||
field @Deprecated public static final int STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17; // 0x11
|
||||
}
|
||||
|
||||
public class WifiEnterpriseConfig implements android.os.Parcelable {
|
||||
method @Nullable public String[] getCaCertificateAliases();
|
||||
method @NonNull public String getCaPath();
|
||||
method @NonNull public String getClientCertificateAlias();
|
||||
method public int getOcsp();
|
||||
method public void setCaCertificateAliases(@Nullable String[]);
|
||||
method public void setCaPath(@Nullable String);
|
||||
method public void setClientCertificateAlias(@Nullable String);
|
||||
method public void setOcsp(int);
|
||||
field public static final int OCSP_NONE = 0; // 0x0
|
||||
field public static final int OCSP_REQUEST_CERT_STATUS = 1; // 0x1
|
||||
field public static final int OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 3; // 0x3
|
||||
field public static final int OCSP_REQUIRE_CERT_STATUS = 2; // 0x2
|
||||
}
|
||||
|
||||
public class WifiFrameworkInitializer {
|
||||
method public static void registerServiceWrappers();
|
||||
}
|
||||
|
||||
@@ -152,10 +152,35 @@ MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(
|
||||
|
||||
|
||||
|
||||
|
||||
MutableBareField: android.net.IpConfiguration#httpProxy:
|
||||
Bare field httpProxy must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.IpConfiguration#ipAssignment:
|
||||
Bare field ipAssignment must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.IpConfiguration#proxySettings:
|
||||
Bare field proxySettings must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.IpConfiguration#staticIpConfiguration:
|
||||
Bare field staticIpConfiguration must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#allowAutojoin:
|
||||
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#apBand:
|
||||
Bare field apBand must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#carrierId:
|
||||
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#fromWifiNetworkSpecifier:
|
||||
Bare field fromWifiNetworkSpecifier must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#fromWifiNetworkSuggestion:
|
||||
Bare field fromWifiNetworkSuggestion must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#macRandomizationSetting:
|
||||
Bare field macRandomizationSetting must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#meteredOverride:
|
||||
Bare field meteredOverride must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#requirePMF:
|
||||
Bare field requirePMF must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#saePasswordId:
|
||||
Bare field saePasswordId must be marked final, or moved behind accessors if mutable
|
||||
MutableBareField: android.net.wifi.WifiConfiguration#shared:
|
||||
Bare field shared must be marked final, or moved behind accessors if mutable
|
||||
|
||||
|
||||
NoClone: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
|
||||
|
||||
@@ -1098,16 +1098,12 @@ public class AccessPoint implements Comparable<AccessPoint> {
|
||||
summary.append(mContext.getString(R.string.wifi_check_password_try_again));
|
||||
break;
|
||||
case WifiConfiguration.NetworkSelectionStatus.DISABLED_DHCP_FAILURE:
|
||||
case WifiConfiguration.NetworkSelectionStatus.DISABLED_DNS_FAILURE:
|
||||
summary.append(mContext.getString(R.string.wifi_disabled_network_failure));
|
||||
break;
|
||||
case WifiConfiguration.NetworkSelectionStatus.DISABLED_ASSOCIATION_REJECTION:
|
||||
summary.append(mContext.getString(R.string.wifi_disabled_generic));
|
||||
break;
|
||||
}
|
||||
} else if (mConfig != null && mConfig.getNetworkSelectionStatus().isNotRecommended()) {
|
||||
summary.append(mContext.getString(
|
||||
R.string.wifi_disabled_by_recommendation_provider));
|
||||
} else if (mIsCarrierAp) {
|
||||
summary.append(String.format(mContext.getString(
|
||||
R.string.available_via_carrier), mCarrierName));
|
||||
|
||||
@@ -518,8 +518,7 @@ public class WifiTracker implements LifecycleObserver, OnStart, OnStop, OnDestro
|
||||
int networkId, final List<WifiConfiguration> configs) {
|
||||
if (configs != null) {
|
||||
for (WifiConfiguration config : configs) {
|
||||
if (mLastInfo != null && networkId == config.networkId &&
|
||||
!(config.selfAdded && config.numAssociation == 0)) {
|
||||
if (mLastInfo != null && networkId == config.networkId) {
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ import java.util.Map;
|
||||
|
||||
public class WifiUtils {
|
||||
|
||||
private static final int INVALID_RSSI = -127;
|
||||
|
||||
public static String buildLoggingSummary(AccessPoint accessPoint, WifiConfiguration config) {
|
||||
final StringBuilder summary = new StringBuilder();
|
||||
final WifiInfo info = accessPoint.getInfo();
|
||||
@@ -106,8 +108,8 @@ public class WifiUtils {
|
||||
visibility.append(String.format("rx=%.1f", info.getRxSuccessRate()));
|
||||
}
|
||||
|
||||
int maxRssi5 = WifiConfiguration.INVALID_RSSI;
|
||||
int maxRssi24 = WifiConfiguration.INVALID_RSSI;
|
||||
int maxRssi5 = INVALID_RSSI;
|
||||
int maxRssi24 = INVALID_RSSI;
|
||||
final int maxDisplayedScans = 4;
|
||||
int num5 = 0; // number of scanned BSSID on 5GHz band
|
||||
int num24 = 0; // number of scanned BSSID on 2.4Ghz band
|
||||
|
||||
@@ -459,10 +459,11 @@ public class AccessPointTest {
|
||||
|
||||
@Test
|
||||
public void testSummaryString_showsWrongPasswordLabel() {
|
||||
WifiConfiguration configuration = createWifiConfiguration();
|
||||
configuration.getNetworkSelectionStatus().setNetworkSelectionStatus(
|
||||
WifiConfiguration.NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED);
|
||||
configuration.getNetworkSelectionStatus().setNetworkSelectionDisableReason(
|
||||
WifiConfiguration configuration = spy(createWifiConfiguration());
|
||||
WifiConfiguration.NetworkSelectionStatus status =
|
||||
mock(WifiConfiguration.NetworkSelectionStatus.class);
|
||||
when(configuration.getNetworkSelectionStatus()).thenReturn(status);
|
||||
when(status.getNetworkSelectionDisableReason()).thenReturn(
|
||||
WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD);
|
||||
AccessPoint ap = new AccessPoint(mContext, configuration);
|
||||
|
||||
|
||||
@@ -494,7 +494,6 @@ public class WifiTrackerTest {
|
||||
|
||||
WifiConfiguration selfAddedNoAssociation = new WifiConfiguration();
|
||||
selfAddedNoAssociation.ephemeral = true;
|
||||
selfAddedNoAssociation.selfAdded = true;
|
||||
selfAddedNoAssociation.numAssociation = 0;
|
||||
selfAddedNoAssociation.SSID = SSID_2;
|
||||
selfAddedNoAssociation.BSSID = BSSID_2;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,9 @@
|
||||
package android.net.wifi;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.UnsupportedAppUsage;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -118,18 +120,21 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
* Do not use OCSP stapling (TLS certificate status extension)
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final int OCSP_NONE = 0;
|
||||
|
||||
/**
|
||||
* Try to use OCSP stapling, but not require response
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final int OCSP_REQUEST_CERT_STATUS = 1;
|
||||
|
||||
/**
|
||||
* Require valid OCSP stapling response
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final int OCSP_REQUIRE_CERT_STATUS = 2;
|
||||
|
||||
/**
|
||||
@@ -137,6 +142,7 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
* certificate chain
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final int OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 3;
|
||||
|
||||
/** @hide */
|
||||
@@ -147,8 +153,7 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS
|
||||
})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Ocsp {
|
||||
}
|
||||
public @interface Ocsp {}
|
||||
|
||||
/**
|
||||
* Whether to use/require OCSP (Online Certificate Status Protocol) to check server certificate.
|
||||
@@ -636,9 +641,11 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
* <p> See the {@link android.security.KeyChain} for details on installing or choosing
|
||||
* a certificate.
|
||||
* </p>
|
||||
* @param aliases identifies the certificate
|
||||
* @param aliases identifies the certificate. Can be null to indicate the absence of a
|
||||
* certificate.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setCaCertificateAliases(@Nullable String[] aliases) {
|
||||
if (aliases == null) {
|
||||
setFieldValue(CA_CERT_KEY, null, CA_CERT_PREFIX);
|
||||
@@ -669,11 +676,13 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CA certificate aliases
|
||||
* @return alias to the CA certificate
|
||||
* Get CA certificate aliases.
|
||||
* @return alias to the CA certificate, or null if unset.
|
||||
* @hide
|
||||
*/
|
||||
@Nullable public String[] getCaCertificateAliases() {
|
||||
@Nullable
|
||||
@SystemApi
|
||||
public String[] getCaCertificateAliases() {
|
||||
String value = getFieldValue(CA_CERT_KEY);
|
||||
if (value.startsWith(CA_CERT_PREFIX)) {
|
||||
// Backwards compatibility: parse the original alias prefix.
|
||||
@@ -792,32 +801,36 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
* like /etc/ssl/certs. If configured, these certificates are added to the
|
||||
* list of trusted CAs. ca_cert may also be included in that case, but it is
|
||||
* not required.
|
||||
* @param domain The path for CA certificate files
|
||||
* @param path The path for CA certificate files, or null/empty string to clear.
|
||||
* @hide
|
||||
*/
|
||||
public void setCaPath(String path) {
|
||||
@SystemApi
|
||||
public void setCaPath(@Nullable String path) {
|
||||
setFieldValue(CA_PATH_KEY, path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the domain_suffix_match value. See setDomSuffixMatch.
|
||||
* @return The path for CA certificate files.
|
||||
* @return The path for CA certificate files, or an empty string if unset.
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
@SystemApi
|
||||
public String getCaPath() {
|
||||
return getFieldValue(CA_PATH_KEY);
|
||||
}
|
||||
|
||||
/** Set Client certificate alias.
|
||||
/**
|
||||
* Set Client certificate alias.
|
||||
*
|
||||
* <p> See the {@link android.security.KeyChain} for details on installing or choosing
|
||||
* a certificate
|
||||
* </p>
|
||||
* @param alias identifies the certificate
|
||||
* @param alias identifies the certificate, or null/empty string to clear.
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
public void setClientCertificateAlias(String alias) {
|
||||
@SystemApi
|
||||
public void setClientCertificateAlias(@Nullable String alias) {
|
||||
setFieldValue(CLIENT_CERT_KEY, alias, CLIENT_CERT_PREFIX);
|
||||
setFieldValue(PRIVATE_KEY_ID_KEY, alias, Credentials.USER_PRIVATE_KEY);
|
||||
// Also, set engine parameters
|
||||
@@ -831,11 +844,12 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get client certificate alias
|
||||
* @return alias to the client certificate
|
||||
* Get client certificate alias.
|
||||
* @return alias to the client certificate, or an empty string if unset.
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
@NonNull
|
||||
@SystemApi
|
||||
public String getClientCertificateAlias() {
|
||||
return getFieldValue(CLIENT_CERT_KEY, CLIENT_CERT_PREFIX);
|
||||
}
|
||||
@@ -1241,12 +1255,14 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the ocsp type.
|
||||
* @param ocsp is one {@link ##OCSP_NONE}, {@link #OCSP_REQUEST_CERT_STATUS},
|
||||
* Set the OCSP type.
|
||||
* @param ocsp is one of {@link ##OCSP_NONE}, {@link #OCSP_REQUEST_CERT_STATUS},
|
||||
* {@link #OCSP_REQUIRE_CERT_STATUS} or
|
||||
* {@link #OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS}
|
||||
* @throws IllegalArgumentException if the OCSP type is invalid
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setOcsp(@Ocsp int ocsp) {
|
||||
if (ocsp >= OCSP_NONE && ocsp <= OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS) {
|
||||
mOcsp = ocsp;
|
||||
@@ -1256,10 +1272,10 @@ public class WifiEnterpriseConfig implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ocsp type.
|
||||
* @return ocsp type
|
||||
* Get the OCSP type.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public @Ocsp int getOcsp() {
|
||||
return mOcsp;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package android.net.wifi;
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.net.MacAddress;
|
||||
@@ -89,37 +90,6 @@ public class WifiConfigurationTest {
|
||||
assertArrayEquals(bytes, rebytes);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNetworkSelectionStatusCopy() {
|
||||
NetworkSelectionStatus networkSelectionStatus = new NetworkSelectionStatus();
|
||||
networkSelectionStatus.setNotRecommended(true);
|
||||
|
||||
NetworkSelectionStatus copy = new NetworkSelectionStatus();
|
||||
copy.copy(networkSelectionStatus);
|
||||
|
||||
assertEquals(networkSelectionStatus.isNotRecommended(), copy.isNotRecommended());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNetworkSelectionStatusParcel() {
|
||||
NetworkSelectionStatus networkSelectionStatus = new NetworkSelectionStatus();
|
||||
networkSelectionStatus.setNotRecommended(true);
|
||||
|
||||
Parcel parcelW = Parcel.obtain();
|
||||
networkSelectionStatus.writeToParcel(parcelW);
|
||||
byte[] bytes = parcelW.marshall();
|
||||
parcelW.recycle();
|
||||
|
||||
Parcel parcelR = Parcel.obtain();
|
||||
parcelR.unmarshall(bytes, 0, bytes.length);
|
||||
parcelR.setDataPosition(0);
|
||||
|
||||
NetworkSelectionStatus copy = new NetworkSelectionStatus();
|
||||
copy.readFromParcel(parcelR);
|
||||
|
||||
assertEquals(networkSelectionStatus.isNotRecommended(), copy.isNotRecommended());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsOpenNetwork_IsOpen_NullWepKeys() {
|
||||
WifiConfiguration config = new WifiConfiguration();
|
||||
@@ -348,4 +318,18 @@ public class WifiConfigurationTest {
|
||||
config.allowedKeyManagement.set(KeyMgmt.NONE);
|
||||
assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.NONE], config.getSsidAndSecurityTypeString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that the {@link NetworkSelectionStatus.DisableReasonInfo}s are populated in
|
||||
* {@link NetworkSelectionStatus#DISABLE_REASON_INFOS} for reason codes from 0 to
|
||||
* {@link NetworkSelectionStatus#NETWORK_SELECTION_DISABLED_MAX} - 1.
|
||||
*/
|
||||
@Test
|
||||
public void testNetworkSelectionDisableReasonInfosPopulated() {
|
||||
assertEquals(NetworkSelectionStatus.NETWORK_SELECTION_DISABLED_MAX,
|
||||
NetworkSelectionStatus.DISABLE_REASON_INFOS.size());
|
||||
for (int i = 0; i < NetworkSelectionStatus.NETWORK_SELECTION_DISABLED_MAX; i++) {
|
||||
assertNotNull(NetworkSelectionStatus.DISABLE_REASON_INFOS.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user