Android: Enable setting environment variables for android apps

Change-Id: Id4625f081d6997dcabad9b01fb09d6c9c6ef7477
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
Vikas Pachdha
2018-08-02 11:00:06 +02:00
parent 51278a2bd5
commit d55373cab2
15 changed files with 116 additions and 32 deletions

View File

@@ -31,6 +31,7 @@
#include "androidrunconfiguration.h"
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/environmentaspect.h>
#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/target.h>
#include <qtsupport/baseqtversion.h>
@@ -193,6 +194,10 @@ AndroidRunnerWorker::AndroidRunnerWorker(RunWorker *runner, const QString &packa
m_deviceSerialNumber = AndroidManager::deviceSerialNumber(target);
m_apiLevel = AndroidManager::deviceApiLevel(target);
m_extraEnvVars = runConfig->extraAspect<EnvironmentAspect>()->environment();
qCDebug(androidRunWorkerLog) << "Environment variables for the app"
<< m_extraEnvVars.toStringList();
m_extraAppParams = runConfig->runnable().commandLineArguments;
if (auto aspect = runConfig->extraAspect(Constants::ANDROID_AMSTARTARGS))
@@ -607,12 +612,5 @@ void AndroidRunnerWorker::onProcessIdChanged(qint64 pid)
}
}
void AndroidRunnerWorker::setExtraEnvVars(const Utils::Environment &extraEnvVars)
{
m_extraEnvVars = extraEnvVars;
qCDebug(androidRunWorkerLog) << "Settings extra env:"
<< extraEnvVars.toStringList();
}
} // namespace Internal
} // namespace Android