APP版本的获取

serial
BlueMatthew 1 year ago
parent 2039809732
commit e614b6709d

@ -465,6 +465,15 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& pro
{ {
it->second = std::to_string(m_signalLevel); 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)) else if (startsWith(it->first, PROP_JAVA_PREFIX))
{ {
if (powerInfo.empty()) if (powerInfo.empty())
@ -478,6 +487,7 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& pro
} }
} }
} }
// __system_property_get("ro.telephony.default_network", value); // __system_property_get("ro.telephony.default_network", value);

Loading…
Cancel
Save