package hudson.plugins.android_emulator;
import hudson.model.BuildListener;
import hudson.util.ArgumentListBuilder;
import hudson.util.StreamCopyThread;
String deviceLocale, String sdCardSize, boolean wipeData, boolean showWindow,
if (osVersion == null || screenDensity == null || screenResolution == null) { int targetLength = osVersion.length();
osVersion = osVersion.substring(1, targetLength - 1);
if (deviceLocale != null && deviceLocale.length() > 4) { if (sdCardSize != null) { boolean showWindow, String commandLineOptions) { if (Util.fixEmptyAndTrim(avdName) == null) { return new EmulatorConfig(osVersion, screenDensity, screenResolution, deviceLocale,
sdCardSize, wipeData, showWindow, commandLineOptions);
return new EmulatorConfig(avdName, wipeData, showWindow, commandLineOptions);
return String.format("hudson_%s_%s_%s_%s", locale, density, resolution, platform); Gets a task that ensures that an Android AVD exists for this instance's configuration.
- Parameters:
androidSdk The Android SDK to use.isUnix Whether the target system is sane.listener The listener to use for logging.- Returns:
- A Callable that will handle the detection/creation of an appropriate AVD.
return new File(homeDir, ".android/avd/");
while ((line = reader.readLine()) != null) { values.put(parts[0], parts[1]);
Gets the command line arguments to pass to "emulator" based on this instance.
- Returns:
- A string of command line arguments.
sb.append(" -prop persist.sys.language="); sb.append(" -prop persist.sys.country="); A task that locates or creates an AVD based on our local state.
Returns
TRUE if an AVD already existed with these properties, otherwise returns
FALSE if an AVD was newly created, and throws an IOException if the given AVD
or parts required to generate a new AVD were not found.
if (homeDirPath == null) { homeDirPath = System.getenv("HOME"); if (homeDirPath == null) { homeDirPath = System.getenv("USERPROFILE"); if (homeDirPath == null) { final File homeDir = new File(homeDirPath);
boolean createSdCard = false;
boolean avdCreated = false;
process = procBuilder.start();
boolean processAlive = true;
if (errOutput != null && errOutput.length() != 0) {