Merge branch 'issue_1130' into issue_1130_backwards
This commit is contained in:
commit
7f9c459a4a
|
@ -122,7 +122,8 @@ class NsClientReceiverDelegate {
|
|||
boolean newAllowedState = true;
|
||||
|
||||
if (ev.wifiConnected) {
|
||||
if (!allowedSSIDs.trim().isEmpty() && !allowedSSIDs.contains(ev.getSsid())) {
|
||||
if (!allowedSSIDs.trim().isEmpty() &&
|
||||
(!allowedSSIDs.contains(ev.getSsid()) && !allowedSSIDs.contains(ev.ssid))) {
|
||||
newAllowedState = false;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -70,6 +70,14 @@ public class NsClientReceiverDelegateTest {
|
|||
ev.mobileConnected = true;
|
||||
ev.wifiConnected = true;
|
||||
assertTrue(sut.calculateStatus(ev));
|
||||
|
||||
ev.ssid = "test";
|
||||
when(SP.getString(anyInt(), anyString())).thenReturn("\"test\"");
|
||||
assertTrue(sut.calculateStatus(ev));
|
||||
|
||||
ev.ssid = "\"test\"";
|
||||
assertTrue(sut.calculateStatus(ev));
|
||||
|
||||
ev.wifiConnected = false;
|
||||
assertTrue(sut.calculateStatus(ev));
|
||||
|
||||
|
|
Loading…
Reference in a new issue