Commit 286c6b49 authored by Alexander Smorkalov's avatar Alexander Smorkalov

OpenCV Manager hardware detector workaround for not detected ARM SoC support.

parent 0b4eb6a9
...@@ -39,19 +39,13 @@ int GetCpuID() ...@@ -39,19 +39,13 @@ int GetCpuID()
#else #else
result = ARCH_UNKNOWN; result = ARCH_UNKNOWN;
#endif #endif
#else #elif defined(__arm__)
LOGD("Using ARM HW detector"); LOGD("Using ARM HW detector");
it = cpu_info.find("Processor"); it = cpu_info.find("Processor");
if (cpu_info.end() != it) if (cpu_info.end() != it)
{ {
size_t proc_name_pos = it->second.find(CPU_INFO_ARCH_X86_STR); size_t proc_name_pos = it->second.find(CPU_INFO_ARCH_ARMV7_STR);
if (string::npos != proc_name_pos)
{
}
else
{
proc_name_pos = it->second.find(CPU_INFO_ARCH_ARMV7_STR);
if (string::npos != proc_name_pos) if (string::npos != proc_name_pos)
{ {
result |= ARCH_ARMv7; result |= ARCH_ARMv7;
...@@ -70,13 +64,32 @@ int GetCpuID() ...@@ -70,13 +64,32 @@ int GetCpuID()
{ {
result |= ARCH_ARMv5; result |= ARCH_ARMv5;
} }
else
{
// Treat the arch of current binary. Google Play checks
// device hardware before installation. Let's assume that
// if the binary works, it's compatible with current hardware
#if defined __ARM_ARCH_7A__
result |= ARCH_ARMv7;
result |= FEATURES_HAS_VFPv3d16;
#else
result |= ARCH_ARMv5;
#endif
} }
} }
} }
} }
else else
{ {
return ARCH_UNKNOWN; // Treat the arch of current binary. Google Play checks
// device hardware before installation. Let's assume that
// if the binary works, it's compatible with current hardware
#if defined __ARM_ARCH_7A__
result |= ARCH_ARMv7;
result |= FEATURES_HAS_VFPv3;
#else
result |= ARCH_ARMv5;
#endif
} }
it = cpu_info.find("Features"); it = cpu_info.find("Features");
...@@ -107,7 +120,9 @@ int GetCpuID() ...@@ -107,7 +120,9 @@ int GetCpuID()
} }
} }
} }
#endif #else
result = ARCH_UNKNOWN;
#endif
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment