Fix crash issue when click 'Share' button
Hide 'Share' button if access point return null wifi config. Change-Id: I554ce8c3214c94892d57c213d0588c70aad97439 Fixes: 123172888 Test: robotests
This commit is contained in:
@@ -685,6 +685,15 @@ public class WifiDetailPreferenceControllerTest {
|
||||
verify(mockButtonsPref).setButton1Visible(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canShareNetwork_noNetwork() {
|
||||
when(mockAccessPoint.getConfig()).thenReturn(null);
|
||||
|
||||
displayAndResume();
|
||||
|
||||
verify(mockButtonsPref).setButton3Visible(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canModifyNetwork_saved() {
|
||||
assertThat(mController.canModifyNetwork()).isTrue();
|
||||
|
Reference in New Issue
Block a user