Weird properties case. not changed value actually changed on a real device

I have been dealing with battery display recently.

For all devices, I provide percentage display.

property in resources.xml/properties.xml

zq means battery format, in percentage or days left

<property id="zq" type="number">0</property>

this property has not tag <setting> in resources.xml/settings.xml,which means it is immutable.

 

I create a new resources directory resources-batterydays.xml and a settings.xml to make it changable for the devices hava this api.

 

settings.xml

<settings>
<setting propertyKey="@Properties.zq" title="@Strings.h13" prompt="@Strings.h13">
<settingConfig type="list">
<listEntry value="0">@Strings.h14</listEntry>
<listEntry value="1">@Strings.h15</listEntry>
</settingConfig>
</setting>
</settings>

In monkey.jungle, I just include the resources-batterydays merely for the specific devices with that api.

 

My getBatteryValue function:

function getBatteryValue() {
Sys.println("Properties.getValue zq is:" + Properties.getValue("zq"));
Sys.println("Properties.getValue zq is:" + typeName(Properties.getValue("zq")));
if (Properties.getValue("zq") == 0) {
return System.getSystemStats().battery.toNumber() + "%";
} else if (Properties.getValue("zq") == 1) {
if (System.Stats has :batteryInDays) {
return System.getSystemStats().batteryInDays.toNumber() + "日";
}
}
return "-";
}

Recently I find my release version has weird phenomenon.

After starting, the value of battery display properly.

But if I modify some app settings not related to battery format, the value of battery will be - after saving performed.

 

It means the value of zq/ battery format is neither 0 nor 1.

How can it be this?

Did I do something wrong?