Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d43c1492 authored by Mike Lockwood's avatar Mike Lockwood Committed by Steve Kondik
Browse files

Fix broken logic in SettingsProvider.parseProviderList.



We were accidentally stripping both leading and trailing commas
when removing a provider from the enabled provider list.

Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 9196970f
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -403,9 +403,12 @@ public class SettingsProvider extends ContentProvider {
                    }
                    }
                } else if (prefix == '-' && index >= 0) {
                } else if (prefix == '-' && index >= 0) {
                    // remove the provider from the list if present
                    // remove the provider from the list if present
                    // remove leading and trailing commas
                    // remove leading or trailing comma
                    if (index > 0) index--;
                    if (index > 0) {
                    if (end < providers.length()) end++;
                        index--;
                    } else if (end < providers.length()) {
                        end++;
                    }


                    newProviders = providers.substring(0, index);
                    newProviders = providers.substring(0, index);
                    if (end < providers.length()) {
                    if (end < providers.length()) {