Skip to content

Commit

Permalink
[FIXED JENKINS-13931] Don't alter SD card value when saving configura…
Browse files Browse the repository at this point in the history
…tion, as it may contain a variable.
  • Loading branch information
orrc committed Apr 11, 2013
1 parent f3fff7c commit eca8890
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Expand Up @@ -178,6 +178,9 @@ public Environment setUp(AbstractBuild build, final Launcher launcher, BuildList
String screenResolution = Utils.expandVariables(envVars, buildVars, this.screenResolution);
String deviceLocale = Utils.expandVariables(envVars, buildVars, this.deviceLocale);
String sdCardSize = Utils.expandVariables(envVars, buildVars, this.sdCardSize);
if (sdCardSize != null) {
sdCardSize = sdCardSize.toUpperCase().replaceAll("[ B]", "");
}
String targetAbi = Utils.expandVariables(envVars, buildVars, this.targetAbi);

// Expand macros within hardware property values
Expand Down Expand Up @@ -803,9 +806,6 @@ public BuildWrapper newInstance(StaplerRequest req, JSONObject formData) throws
screenResolution = Util.fixEmptyAndTrim(emulatorData.getString("screenResolution"));
deviceLocale = Util.fixEmptyAndTrim(emulatorData.getString("deviceLocale"));
sdCardSize = Util.fixEmptyAndTrim(emulatorData.getString("sdCardSize"));
if (sdCardSize != null) {
sdCardSize = sdCardSize.toUpperCase().replaceAll("[ B]", "");
}
hardware = req.bindJSONToList(HardwareProperty.class, emulatorData.get("hardwareProperties"));
targetAbi = Util.fixEmptyAndTrim(emulatorData.getString("targetAbi"));
}
Expand Down
Expand Up @@ -84,9 +84,6 @@ public EmulatorConfig(String osVersion, String screenDensity, String screenResol
deviceLocale = deviceLocale.substring(0, 2).toLowerCase() +"_"
+ deviceLocale.substring(3).toUpperCase();
}
if (sdCardSize != null) {
sdCardSize = sdCardSize.toUpperCase().replaceAll("[ B]", "");
}

this.osVersion = AndroidPlatform.valueOf(osVersion);
if (this.osVersion == null) {
Expand Down

0 comments on commit eca8890

Please sign in to comment.