clear SMS numbers before processing new ones
This commit is contained in:
parent
c44101ce76
commit
cbb0a4e12b
1 changed files with 2 additions and 3 deletions
|
@ -107,9 +107,8 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
if (ev == null || ev.isChanged(R.string.key_smscommunicator_allowednumbers)) {
|
if (ev == null || ev.isChanged(R.string.key_smscommunicator_allowednumbers)) {
|
||||||
String settings = SP.getString(R.string.key_smscommunicator_allowednumbers, "");
|
String settings = SP.getString(R.string.key_smscommunicator_allowednumbers, "");
|
||||||
|
|
||||||
String pattern = ";";
|
allowedNumbers.clear();
|
||||||
|
String[] substrings = settings.split(";");
|
||||||
String[] substrings = settings.split(pattern);
|
|
||||||
for (String number : substrings) {
|
for (String number : substrings) {
|
||||||
String cleaned = number.replaceAll("\\s+", "");
|
String cleaned = number.replaceAll("\\s+", "");
|
||||||
allowedNumbers.add(cleaned);
|
allowedNumbers.add(cleaned);
|
||||||
|
|
Loading…
Reference in a new issue