版本属性的输出

serial
BlueMatthew 1 year ago
parent e614b6709d
commit 79c3146161

@ -358,10 +358,21 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& 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<std::string, std::string>& 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<std::string, std::string>& pro
it->second = it2->second;
}
}
}
// __system_property_get("ro.telephony.default_network", value);

Loading…
Cancel
Save