DeviceSettings: utils.java: Fix writeValue function