clear SMS numbers before processing new ones

This commit is contained in:
Milos Kozak 2019-10-02 16:43:20 +02:00
parent c44101ce76
commit cbb0a4e12b

View file

@ -107,9 +107,8 @@ public class SmsCommunicatorPlugin extends PluginBase {
if (ev == null || ev.isChanged(R.string.key_smscommunicator_allowednumbers)) {
String settings = SP.getString(R.string.key_smscommunicator_allowednumbers, "");
String pattern = ";";
String[] substrings = settings.split(pattern);
allowedNumbers.clear();
String[] substrings = settings.split(";");
for (String number : substrings) {
String cleaned = number.replaceAll("\\s+", "");
allowedNumbers.add(cleaned);