Commit fe0e3701 authored by Daniel Teske's avatar Daniel Teske

Android: getAbis prevent endless loop

We need to check all ro.product.cpu.abi# properties,
but there's a limited amount of those. So only check up to 5 to ensure
that the loop always terminates. On irc a user reported that on his
device adb shell getprop returns  "/bin/sh: getprop: not found", so
this loop was never terminated.

Change-Id: I819b28cdbedb0bf557ba58e8495a8da5eeb8dc8d
Reviewed-by: default avatarMitch Curtis <mitch.curtis@digia.com>
parent 095d9114
......@@ -772,8 +772,7 @@ bool AndroidConfigurations::hasFinishedBooting(const QString &device) const
QStringList AndroidConfigurations::getAbis(const QString &device) const
{
QStringList result;
int i = 1;
while (true) {
for (int i = 1; i < 6; ++i) {
QStringList arguments = AndroidDeviceInfo::adbSelector(device);
arguments << QLatin1String("shell") << QLatin1String("getprop");
if (i == 1)
......@@ -791,7 +790,6 @@ QStringList AndroidConfigurations::getAbis(const QString &device) const
if (abi.isEmpty())
break;
result << abi;
++i;
}
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