[Wi-Fi] Cannot connect to hidden WiFi network.
When click "Add network" to add a new network, user may ignore the "Hidden network" item, which is in "Advanced options". That will cause the added hidden network can not be connected. To improve it, move the "Hidden network" from last one to be first one. Bug: 135281908 Test: Check if the hidden setting spinner is the first one item in Advanced options. Change-Id: I0f90a6b2992b38ccae461c07d6b13cda0ca9d2b2
This commit is contained in:
@@ -40,6 +40,7 @@ import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -546,4 +547,14 @@ public class WifiConfigControllerTest {
|
||||
|
||||
assertThat(eapMethodSpinner.getSelectedItemPosition()).isEqualTo(Eap.TLS);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getHiddenSettingsPosition_whenAdvancedToggled_shouldBeFirst() {
|
||||
final LinearLayout advancedFieldsLayout = mView.findViewById(R.id.wifi_advanced_fields);
|
||||
final LinearLayout hiddenSettingLayout = mView.findViewById(R.id.hidden_settings_field);
|
||||
|
||||
final LinearLayout firstChild = (LinearLayout) advancedFieldsLayout.getChildAt(0);
|
||||
|
||||
assertThat(firstChild).isEqualTo(hiddenSettingLayout);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user