Android: don't return an unused result from QtNative.startApplication()

No one is using that return code, instead print an error when the
call to startQtAndroidPlugin() fails.

Task-number: QTBUG-118077
Change-Id: I98c8e4ca9af5f1c45af36044336d461bed6acdc9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
Assam Boudjelthia 2023-11-17 14:43:07 +02:00
parent 9826e4e38b
commit b09168740b

View File

@ -254,18 +254,18 @@ public class QtNative
runAction(() -> view.setVisibility(visible ? View.VISIBLE : View.GONE));
}
public static boolean startApplication(ArrayList<String> params, String mainLib)
public static void startApplication(ArrayList<String> params, String mainLib)
{
final boolean[] res = new boolean[1];
synchronized (m_mainActivityMutex) {
String paramsStr = String.join("\t", params);
final String qtParams = mainLib + "\t" + paramsStr;
m_qtThread.run(() -> res[0] = startQtAndroidPlugin(qtParams));
m_qtThread.run(() -> {
final String qtParams = mainLib + "\t" + String.join("\t", params);
if (!startQtAndroidPlugin(qtParams))
Log.e(QtTAG, "An error occurred while starting the Qt Android plugin");
});
m_qtThread.post(QtNative::startQtApplication);
waitForServiceSetup();
m_started = true;
}
return res[0];
}
public static void quitApp()