Skip to content

Commit 392fc35

Browse files
krutonAndroid Code Review
authored andcommitted
Merge "Fix broken logic in SettingsProvider.parseProviderList."
2 parents 5a870fe + bdc7f89 commit 392fc35

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,12 @@ private boolean parseProviderList(Uri url, ContentValues initialValues) {
305305
}
306306
} else if (prefix == '-' && index >= 0) {
307307
// remove the provider from the list if present
308-
// remove leading and trailing commas
309-
if (index > 0) index--;
310-
if (end < providers.length()) end++;
308+
// remove leading or trailing comma
309+
if (index > 0) {
310+
index--;
311+
} else if (end < providers.length()) {
312+
end++;
313+
}
311314

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

0 commit comments

Comments
 (0)