Merge "Update settings to properties mapper to use multi property listener." into qt-dev
This commit is contained in:
@@ -132,16 +132,20 @@ public class SettingsToPropertiesMapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (String deviceConfigScope : mDeviceConfigScopes) {
|
for (String deviceConfigScope : mDeviceConfigScopes) {
|
||||||
DeviceConfig.addOnPropertyChangedListener(
|
DeviceConfig.addOnPropertiesChangedListener(
|
||||||
deviceConfigScope,
|
deviceConfigScope,
|
||||||
AsyncTask.THREAD_POOL_EXECUTOR,
|
AsyncTask.THREAD_POOL_EXECUTOR,
|
||||||
(String scope, String name, String value) -> {
|
(DeviceConfig.Properties properties) -> {
|
||||||
String propertyName = makePropertyName(scope, name);
|
String scope = properties.getNamespace();
|
||||||
if (propertyName == null) {
|
for (String key : properties.getKeyset()) {
|
||||||
log("unable to construct system property for " + scope + "/" + name);
|
String propertyName = makePropertyName(scope, key);
|
||||||
return;
|
if (propertyName == null) {
|
||||||
|
log("unable to construct system property for " + scope + "/"
|
||||||
|
+ key);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setProperty(propertyName, properties.getString(key, null));
|
||||||
}
|
}
|
||||||
setProperty(propertyName, value);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user