Merge "Fix a NPE when forget wifi network" into sc-dev
This commit is contained in:
@@ -1273,6 +1273,18 @@ public class WifiDetailPreferenceController2Test {
|
||||
Settings.Global.WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN, 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forgetNetwork_activityGone_ignoreFinish() {
|
||||
setUpForConnectedNetwork();
|
||||
setUpSpyController();
|
||||
displayAndResume();
|
||||
when(mMockFragment.getActivity()).thenReturn(null);
|
||||
|
||||
mForgetClickListener.getValue().onClick(null);
|
||||
|
||||
verify(mMockActivity, never()).finish();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void forgetNetwork_standardWifiNetwork_forget() {
|
||||
setUpForConnectedNetwork();
|
||||
|
Reference in New Issue
Block a user