[Wi-Fi] Fix robolectric test broken
1. WifiConfigController#setSelection triggers onItemSelect, it uses mEapUserCertSpinner without adapter. 2. refreshSummary should use parameter preference instead of mPreference. Bug: 140771897 Test: WifiConfigControllerTest WifiWakeupPreferenceControllerTest Change-Id: I963260bd82e7387052cacae89bdbe46da841e341
This commit is contained in:
@@ -1070,17 +1070,17 @@ public class WifiConfigController implements TextWatcher,
|
|||||||
mDoNotValidateEapServerString,
|
mDoNotValidateEapServerString,
|
||||||
false,
|
false,
|
||||||
true);
|
true);
|
||||||
// To avoid the user connects to a non-secure network unexpectedly,
|
|
||||||
// request using system trusted certificates by default
|
|
||||||
// unless the user explicitly chooses "Do not validate" or other
|
|
||||||
// CA certificates.
|
|
||||||
setSelection(mEapCaCertSpinner, mUseSystemCertsString);
|
|
||||||
loadCertificates(
|
loadCertificates(
|
||||||
mEapUserCertSpinner,
|
mEapUserCertSpinner,
|
||||||
Credentials.USER_PRIVATE_KEY,
|
Credentials.USER_PRIVATE_KEY,
|
||||||
mDoNotProvideEapUserCertString,
|
mDoNotProvideEapUserCertString,
|
||||||
false,
|
false,
|
||||||
false);
|
false);
|
||||||
|
// To avoid the user connects to a non-secure network unexpectedly,
|
||||||
|
// request using system trusted certificates by default
|
||||||
|
// unless the user explicitly chooses "Do not validate" or other
|
||||||
|
// CA certificates.
|
||||||
|
setSelection(mEapCaCertSpinner, mUseSystemCertsString);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modifying an existing network
|
// Modifying an existing network
|
||||||
|
@@ -118,7 +118,7 @@ public class WifiWakeupPreferenceController extends TogglePreferenceController i
|
|||||||
@Override
|
@Override
|
||||||
public void updateState(Preference preference) {
|
public void updateState(Preference preference) {
|
||||||
super.updateState(preference);
|
super.updateState(preference);
|
||||||
refreshSummary(mPreference);
|
refreshSummary(preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user