Android: add logging for build and run

Change-Id: Idca5a45713762aa9e2861dcc58c3bbd96cbe687e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Vikas Pachdha
2018-06-18 11:49:14 +02:00
parent ccfb7c6aa4
commit aa4407e332
6 changed files with 112 additions and 15 deletions

View File

@@ -41,6 +41,12 @@
#include <projectexplorer/target.h>
#include <utils/url.h>
#include <QLoggingCategory>
namespace {
Q_LOGGING_CATEGORY(androidRunnerLog, "qtc.android.run.androidrunner")
}
using namespace ProjectExplorer;
using namespace Utils;
@@ -130,8 +136,11 @@ AndroidRunner::AndroidRunner(RunControl *runControl,
QString intent = intentName.isEmpty() ? AndroidManager::intentName(m_target) : intentName;
m_packageName = intent.left(intent.indexOf('/'));
qCDebug(androidRunnerLog) << "Intent name:" << intent << "Package name" << m_packageName;
const int apiLevel = AndroidManager::deviceApiLevel(m_target);
qCDebug(androidRunnerLog) << "Device API:" << apiLevel;
m_worker.reset(new AndroidRunnerWorker(this, m_packageName));
m_worker->setIntentName(intent);
m_worker->setIsPreNougat(apiLevel <= 23);
@@ -168,7 +177,7 @@ AndroidRunner::~AndroidRunner()
void AndroidRunner::start()
{
if (!ProjectExplorerPlugin::projectExplorerSettings().deployBeforeRun) {
// User choose to run the app without deployment. Start the AVD if not running.
qCDebug(androidRunnerLog) << "Run without deployment";
launchAVD();
if (!m_launchedAVDName.isEmpty()) {
m_checkAVDTimer.start();