From: GiWoong Kim Date: Tue, 26 Nov 2013 06:41:50 +0000 (+0900) Subject: config: modified getValidResolution function X-Git-Tag: TizenStudio_2.0_p2.3~441 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=baadd7ba4e194b95268dc9103dac2f9cf23f551b;p=sdk%2Femulator%2Fqemu.git config: modified getValidResolution function filter out the negative value from start-up arguments Change-Id: I4bdbff17fd4c7554ed465fb890d8dcfa686721d3 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java b/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java index 7286749..640159d 100644 --- a/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java +++ b/tizen/src/skin/client/src/org/tizen/emulator/skin/config/EmulatorConfig.java @@ -425,11 +425,23 @@ public class EmulatorConfig { } public int getValidResolutionWidth() { - return getArgInt(ArgsConstants.RESOLUTION_WIDTH); + final int storedValue = getArgInt(ArgsConstants.RESOLUTION_WIDTH, 1); + + if (storedValue > 0) { + return storedValue; + } else { + return 1; + } } public int getValidResolutionHeight() { - return getArgInt(ArgsConstants.RESOLUTION_HEIGHT); + final int storedValue = getArgInt(ArgsConstants.RESOLUTION_HEIGHT, 1); + + if (storedValue > 0) { + return storedValue; + } else { + return 1; + } } /* java properties */ @@ -514,7 +526,7 @@ public class EmulatorConfig { } public int getValidScale() { - int storedScale = getSkinPropertyInt( + final int storedScale = getSkinPropertyInt( SkinPropertiesConstants.WINDOW_SCALE, DEFAULT_WINDOW_SCALE); if (storedScale >= MIN_SCALE_FACTOR &&