|
|
|
@ -153,7 +153,7 @@ void CPhoneDevice::CPhoneCamera::on_error(const std::string& msg)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPath, unsigned int netId) : mCameraPowerCount(0), mOtgCount(0)
|
|
|
|
|
CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPath, unsigned int netId, unsigned int versionCode) : mCameraPowerCount(0), mOtgCount(0), mVersionCode(versionCode)
|
|
|
|
|
{
|
|
|
|
|
mCamera = NULL;
|
|
|
|
|
m_listener = NULL;
|
|
|
|
@ -336,6 +336,11 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& pro
|
|
|
|
|
|
|
|
|
|
for (std::map<std::string, std::string>::iterator it = properties.begin(); it != properties.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
if (!(it->second.empty()))
|
|
|
|
|
{
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (it->first == PROP_EQUIP_NAME)
|
|
|
|
|
{
|
|
|
|
|
__system_property_get("ro.product.name", value);
|
|
|
|
@ -351,11 +356,14 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& pro
|
|
|
|
|
__system_property_get("ro.product.manufacturer", value);
|
|
|
|
|
it->second = value;
|
|
|
|
|
}
|
|
|
|
|
else if (it->first == PROP_VERSION) {
|
|
|
|
|
__system_property_get("ro.build.version.release", value);
|
|
|
|
|
else if (it->first == PROP_VERSION)
|
|
|
|
|
{
|
|
|
|
|
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_PROD_DATE) {
|
|
|
|
|
else if (it->first == PROP_PROD_DATE)
|
|
|
|
|
{
|
|
|
|
|
__system_property_get("ro.build.date.utc", value);
|
|
|
|
|
it->second = value;
|
|
|
|
|
}
|
|
|
|
|