Handle location enabled setting null value
We have the notion of a null value object whose internal value is null. If it happens that the setting was never populated we get back the null object whose value is null and the code does not expect null and crashes. bug:35368238 Test: manual Change-Id: I02c3771b94a45b4ee53e2141711eed134542ea0c
This commit is contained in:
@@ -1654,7 +1654,7 @@ public class SettingsProvider extends ContentProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
String oldProviders = (settingValue != null) ? settingValue.getValue() : "";
|
||||
String oldProviders = !settingValue.isNull() ? settingValue.getValue() : "";
|
||||
|
||||
int index = oldProviders.indexOf(value);
|
||||
int end = index + value.length();
|
||||
|
||||
Reference in New Issue
Block a user