Disable hidden network spinner on existing networks

We only want this to be modifiable if you are adding a network
manually, so this CL disables it for existing networks. You
can still see what the spinner is set to though.

Test: robotests
Bug: 78436456
Change-Id: If660e432eca2dabf5bd16881368657ee89fe5a57
This commit is contained in:
Salvador Martinez
2018-04-23 10:50:22 -07:00
parent 8a3bcaa3e3
commit 35b76437e0
2 changed files with 13 additions and 0 deletions

View File

@@ -258,6 +258,16 @@ public class WifiConfigControllerTest {
assertThat(warningView.getVisibility()).isEqualTo(View.GONE);
}
@Test
public void hiddenView_isDisabledWhenAppropriate() {
View hiddenSpinner = mView.findViewById(R.id.hidden_settings);
assertThat(hiddenSpinner.isEnabled()).isFalse();
mController = new TestWifiConfigController(mConfigUiBase, mView, null /* accessPoint */,
WifiConfigUiBase.MODE_CONNECT);
assertThat(hiddenSpinner.isEnabled()).isTrue();
}
public class TestWifiConfigController extends WifiConfigController {
private TestWifiConfigController(