Allow backwards compatibility to previous solution to add quotes
This commit is contained in:
parent
e32f33a8d3
commit
8bdaddb389
2 changed files with 10 additions and 1 deletions
|
@ -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