Remove those stuff about CarrierAp, they are removed from FW.
Bug: 130875004 Test: atest SettingsRoboTests Change-Id: I549eabd1699a617dd6e639b725ade361c64d5a67
This commit is contained in:
@@ -347,18 +347,11 @@ public class WifiConfigController implements TextWatcher,
|
||||
showProxyFields();
|
||||
final CheckBox advancedTogglebox =
|
||||
(CheckBox) mView.findViewById(R.id.wifi_advanced_togglebox);
|
||||
mView.findViewById(R.id.wifi_advanced_toggle).setVisibility(
|
||||
mAccessPoint.isCarrierAp() ? View.GONE : View.VISIBLE);
|
||||
advancedTogglebox.setOnCheckedChangeListener(this);
|
||||
advancedTogglebox.setChecked(showAdvancedFields);
|
||||
setAdvancedOptionAccessibilityString(showAdvancedFields);
|
||||
mView.findViewById(R.id.wifi_advanced_fields)
|
||||
.setVisibility(showAdvancedFields ? View.VISIBLE : View.GONE);
|
||||
if (mAccessPoint.isCarrierAp()) {
|
||||
addRow(group, R.string.wifi_carrier_connect,
|
||||
String.format(mContext.getString(R.string.wifi_carrier_content),
|
||||
mAccessPoint.getCarrierName()));
|
||||
}
|
||||
}
|
||||
|
||||
if (mMode == WifiConfigUiBase.MODE_MODIFY) {
|
||||
@@ -1068,12 +1061,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
}
|
||||
}
|
||||
|
||||
if (mAccessPointSecurity != AccessPoint.SECURITY_EAP_SUITE_B
|
||||
&& mAccessPoint != null
|
||||
&& mAccessPoint.isCarrierAp()) {
|
||||
mEapMethodSpinner.setSelection(mAccessPoint.getCarrierApEapType());
|
||||
}
|
||||
|
||||
if (refreshCertificates) {
|
||||
loadCertificates(
|
||||
mEapCaCertSpinner,
|
||||
@@ -1263,9 +1250,6 @@ public class WifiConfigController implements TextWatcher,
|
||||
setUserCertInvisible();
|
||||
setPasswordInvisible();
|
||||
setIdentityInvisible();
|
||||
if (mAccessPoint != null && mAccessPoint.isCarrierAp()) {
|
||||
setEapMethodInvisible();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -18,12 +18,8 @@ package com.android.settings.wifi;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.Mockito.any;
|
||||
import static org.mockito.Mockito.anyBoolean;
|
||||
import static org.mockito.Mockito.anyInt;
|
||||
import static org.mockito.Mockito.anyString;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -37,7 +33,6 @@ import android.os.ServiceSpecificException;
|
||||
import android.security.KeyStore;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CheckBox;
|
||||
@@ -229,34 +224,6 @@ public class WifiConfigControllerTest {
|
||||
assertThat(mController.getSignalString()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void showForCarrierAp() {
|
||||
// Setup the mock view for wifi dialog.
|
||||
View view = mock(View.class);
|
||||
TextView nameText = mock(TextView.class);
|
||||
TextView valueText = mock(TextView.class);
|
||||
when(view.findViewById(R.id.name)).thenReturn(nameText);
|
||||
when(view.findViewById(R.id.value)).thenReturn(valueText);
|
||||
LayoutInflater inflater = mock(LayoutInflater.class);
|
||||
when(inflater.inflate(anyInt(), any(ViewGroup.class), anyBoolean())).thenReturn(view);
|
||||
when(mConfigUiBase.getLayoutInflater()).thenReturn(inflater);
|
||||
|
||||
String carrierName = "Test Carrier";
|
||||
when(mAccessPoint.isCarrierAp()).thenReturn(true);
|
||||
when(mAccessPoint.getCarrierName()).thenReturn(carrierName);
|
||||
mController = new TestWifiConfigController(mConfigUiBase, mView, mAccessPoint,
|
||||
WifiConfigUiBase.MODE_CONNECT);
|
||||
// Verify the content of the text fields.
|
||||
verify(nameText).setText(R.string.wifi_carrier_connect);
|
||||
verify(valueText).setText(
|
||||
String.format(mContext.getString(R.string.wifi_carrier_content), carrierName));
|
||||
// Verify that the advance toggle is not visible.
|
||||
assertThat(mView.findViewById(R.id.wifi_advanced_toggle).getVisibility())
|
||||
.isEqualTo(View.GONE);
|
||||
// Verify that the EAP method menu is not visible.
|
||||
assertThat(mView.findViewById(R.id.eap).getVisibility()).isEqualTo(View.GONE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void loadCertificates_keyStoreListFail_shouldNotCrash() {
|
||||
// Set up
|
||||
|
Reference in New Issue
Block a user