diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 308d326c..455ff16c 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -358,10 +358,21 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro } else if (it->first == PROP_VERSION) { + // FOR Protocol snprintf(value, sizeof(value), "%u.%03u", (mVersionCode / 1000), (mVersionCode % 1000)); // __system_property_get("ro.build.version.release", value); it->second = value; } + else if (it->first == (PROP_VERSION_ABBR)) + { + // FOR OSD + string version = std::to_string(mVersionCode / 100000); + version += "."; + version += std::to_string((mVersionCode % 100000) / 1000); + version += "."; + version += std::to_string(mVersionCode % 1000); + it->second = version; + } else if (it->first == PROP_PROD_DATE) { __system_property_get("ro.build.date.utc", value); @@ -465,15 +476,6 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro { it->second = std::to_string(m_signalLevel); } - else if (it->first == (PROP_VERSION) || it->first == (PROP_VERSION_ABBR)) - { - string version = std::to_string(mVersionCode / 100000); - version += "."; - version += std::to_string((mVersionCode % 100000) / 1000); - version += "."; - version += std::to_string(mVersionCode % 1000); - it->second = version; - } else if (startsWith(it->first, PROP_JAVA_PREFIX)) { if (powerInfo.empty()) @@ -486,8 +488,6 @@ bool CPhoneDevice::QuerySystemProperties(std::map& pro it->second = it2->second; } } - - } // __system_property_get("ro.telephony.default_network", value);